/*
 * Copyright 2019 ACINQ SAS
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package fr.acinq.eclair.json

import akka.actor.ActorRef
import akka.testkit.TestProbe
import fr.acinq.bitcoin.scalacompat.Crypto.{PrivateKey, PublicKey}
import fr.acinq.bitcoin.scalacompat.{Block, Btc, ByteVector32, ByteVector64, DeterministicWallet, OutPoint, Satoshi, SatoshiLong, Transaction, TxHash, TxId, TxOut}
import fr.acinq.eclair._
import fr.acinq.eclair.balance.CheckBalance
import fr.acinq.eclair.balance.CheckBalance.{GlobalBalance, MainAndHtlcBalance}
import fr.acinq.eclair.blockchain.fee.FeeratePerKw
import fr.acinq.eclair.channel.ChannelSpendSignature.IndividualSignature
import fr.acinq.eclair.channel._
import fr.acinq.eclair.crypto.{ShaChain, Sphinx}
import fr.acinq.eclair.db.OfferData
import fr.acinq.eclair.io.Peer
import fr.acinq.eclair.io.Peer.PeerInfo
import fr.acinq.eclair.payment.{Invoice, PaymentSettlingOnChain}
import fr.acinq.eclair.transactions.Transactions._
import fr.acinq.eclair.transactions.{CommitmentSpec, IncomingHtlc, OutgoingHtlc, Transactions}
import fr.acinq.eclair.wire.internal.channel.ChannelCodecs
import fr.acinq.eclair.wire.protocol.OfferTypes.{Offer, OfferTlv}
import fr.acinq.eclair.wire.protocol._
import org.scalatest.funsuite.AnyFunSuiteLike
import org.scalatest.matchers.should.Matchers
import scodec.bits._

import java.net.InetAddress
import java.util.{Currency, UUID}

class JsonSerializersSpec extends TestKitBaseClass with AnyFunSuiteLike with Matchers {

  test("deserialize Map[OutPoint, ByteVector]") {
    val output1 = OutPoint(TxHash.fromValidHex("11418a2d282a40461966e4f578e1fdf633ad15c1b7fb3e771d14361127233be1"), 0)
    val output2 = OutPoint(TxHash.fromValidHex("3d62bd4f71dc63798418e59efbc7532380c900b5e79db3a5521374b161dd0e33"), 1)
    val map = Map(
      output1 -> hex"dead",
      output2 -> hex"beef"
    )

    // it won't work with the default key serializer
    val error = intercept[org.json4s.MappingException] {
      JsonSerializers.serialization.write(map)(org.json4s.DefaultFormats)
    }
    assert(error.msg.contains("Do not know how to serialize key of type class fr.acinq.bitcoin.scalacompat.OutPoint. Consider implementing a CustomKeySerializer."))

    // but it works with our custom key serializer
    val json = JsonSerializers.serialization.write(map)(org.json4s.DefaultFormats + ByteVectorSerializer + OutPointKeySerializer)
    assertJsonEquals(json, s"""{"${output1.txid}:0":"dead","${output2.txid}:1":"beef"}""")
  }

  test("deserialize Map[OutPoint, Transaction]") {
    val output1 = OutPoint(TxHash.fromValidHex("11418a2d282a40461966e4f578e1fdf633ad15c1b7fb3e771d14361127233be1"), 0)
    val output2 = OutPoint(TxHash.fromValidHex("3d62bd4f71dc63798418e59efbc7532380c900b5e79db3a5521374b161dd0e33"), 1)
    val map = Map(
      output1 -> Transaction.read("0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800"),
      output2 -> Transaction.read("0200000001adbb20ea41a8423ea937e76e8151636bf6093b70eaff942930d20576600521fd000000006b48304502210090587b6201e166ad6af0227d3036a9454223d49a1f11839c1a362184340ef0240220577f7cd5cca78719405cbf1de7414ac027f0239ef6e214c90fcaab0454d84b3b012103535b32d5eb0a6ed0982a0479bbadc9868d9836f6ba94dd5a63be16d875069184ffffffff028096980000000000220020c015c4a6be010e21657068fc2e6a9d02b27ebe4d490a25846f7237f104d1a3cd20256d29010000001600143ca33c2e4446f4a305f23c80df8ad1afdcf652f900000000")
    )

    // it won't work with the default key serializer
    val error = intercept[org.json4s.MappingException] {
      JsonSerializers.serialization.write(map)(org.json4s.DefaultFormats)
    }
    assert(error.msg.contains("Do not know how to serialize key of type class fr.acinq.bitcoin.scalacompat.OutPoint. Consider implementing a CustomKeySerializer."))

    // but it works with our custom key serializer
    val json = JsonSerializers.serialization.write(map)(org.json4s.DefaultFormats + TransactionSerializer + OutPointKeySerializer)
    val expectedJson =
      s"""{
         |  "${output1.txid}:0": {
         |    "txid": "3ef63b5d297c9dcf93f33b45b9f102733c36e8ef61da1ccf2bc132a10584be18",
         |    "tx": "0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800"
         |  },
         |  "${output2.txid}:1": {
         |    "txid": "8984484a580b825b9972d7adb15050b3ab624ccd731946b3eeddb92f4e7ef6be",
         |    "tx": "0200000001adbb20ea41a8423ea937e76e8151636bf6093b70eaff942930d20576600521fd000000006b48304502210090587b6201e166ad6af0227d3036a9454223d49a1f11839c1a362184340ef0240220577f7cd5cca78719405cbf1de7414ac027f0239ef6e214c90fcaab0454d84b3b012103535b32d5eb0a6ed0982a0479bbadc9868d9836f6ba94dd5a63be16d875069184ffffffff028096980000000000220020c015c4a6be010e21657068fc2e6a9d02b27ebe4d490a25846f7237f104d1a3cd20256d29010000001600143ca33c2e4446f4a305f23c80df8ad1afdcf652f900000000"
         |  }
         |}
    """.stripMargin
    assertJsonEquals(json, expectedJson)
  }

  test("NodeAddress serialization") {
    val ipv4 = IPAddress(InetAddress.getByName("10.0.0.1"), 8888)
    val ipv6 = IPAddress(InetAddress.getByName("[2405:204:66a9:536c:873f:dc4a:f055:a298]"), 9737)
    val ipv6LocalHost = IPAddress(InetAddress.getByAddress(Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)), 9735)
    val tor2 = Tor2("aaaqeayeaudaocaj", 7777)
    val tor3 = Tor3("aaaqeayeaudaocajbifqydiob4ibceqtcqkrmfyydenbwha5dypsaijc", 9999)
    val dnsHostName = DnsHostname("acinq.co", 8888)

    JsonSerializers.serialization.write(ipv4)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""10.0.0.1:8888""""
    JsonSerializers.serialization.write(ipv6)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""[2405:204:66a9:536c:873f:dc4a:f055:a298]:9737""""
    JsonSerializers.serialization.write(ipv6LocalHost)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""[::1]:9735""""
    JsonSerializers.serialization.write(tor2)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""aaaqeayeaudaocaj.onion:7777""""
    JsonSerializers.serialization.write(tor3)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""aaaqeayeaudaocajbifqydiob4ibceqtcqkrmfyydenbwha5dypsaijc.onion:9999""""
    JsonSerializers.serialization.write(dnsHostName)(org.json4s.DefaultFormats + NodeAddressSerializer) shouldBe s""""acinq.co:8888""""
  }

  test("PeerInfo serialization") {
    val peerInfo = PeerInfo(ActorRef.noSender, PublicKey(hex"0270685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b"), Peer.CONNECTED, None, None, Set(ActorRef.noSender))
    val expected = """{"nodeId":"0270685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b","state":"CONNECTED","channels":1}"""
    JsonSerializers.serialization.write(peerInfo)(JsonSerializers.formats) shouldBe expected
  }

  test("RES_GET_CHANNEL_INFO serialization") {
    val probe = TestProbe()(system)
    val dummyPublicKey = PrivateKey(hex"0101010101010101010101010101010101010101010101010101010101010101").publicKey
    val dummyBytes32 = ByteVector32(hex"0202020202020202020202020202020202020202020202020202020202020202")
    val localChannelParams = LocalChannelParams(dummyPublicKey, DeterministicWallet.KeyPath(Seq(42L)), Some(1000 sat), isChannelOpener = true, paysCommitTxFees = true, None, Features.empty)
    val localCommitParams = CommitParams(546 sat, 1 msat, UInt64(Long.MaxValue), 50, CltvExpiryDelta(144))
    val remoteChannelParams = RemoteChannelParams(dummyPublicKey, Some(1000 sat), dummyPublicKey, dummyPublicKey, dummyPublicKey, dummyPublicKey, Features.empty, None)
    val remoteCommitParams = CommitParams(546 sat, 1 msat, UInt64.MaxValue, 50, CltvExpiryDelta(144))
    val commitmentInput = Transactions.makeFundingInputInfo(TxId(dummyBytes32), 0, 150_000 sat, dummyPublicKey, dummyPublicKey, ZeroFeeHtlcTxAnchorOutputsCommitmentFormat)
    val localCommit = LocalCommit(0, CommitmentSpec(Set.empty, FeeratePerKw(2500 sat), 100_000_000 msat, 50_000_000 msat), TxId(dummyBytes32), IndividualSignature(ByteVector64.Zeroes), Nil)
    val remoteCommit = RemoteCommit(0, CommitmentSpec(Set.empty, FeeratePerKw(2500 sat), 50_000_000 msat, 100_000_000 msat), TxId(dummyBytes32), dummyPublicKey)
    val channelInfo = RES_GET_CHANNEL_INFO(
      PublicKey(hex"0270685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b"),
      ByteVector32(hex"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"),
      probe.ref,
      NORMAL,
      DATA_NORMAL(
        Commitments(
          ChannelParams(dummyBytes32, ChannelConfig.standard, ChannelFeatures(), localChannelParams, remoteChannelParams, ChannelFlags(announceChannel = true)),
          CommitmentChanges(LocalChanges(Nil, Nil, Nil), RemoteChanges(Nil, Nil, Nil), localNextHtlcId = 1, remoteNextHtlcId = 1),
          List(Commitment(0, 0, commitmentInput.outPoint, 150_000 sat, dummyPublicKey, LocalFundingStatus.SingleFundedUnconfirmedFundingTx(None), RemoteFundingStatus.Locked, ZeroFeeHtlcTxAnchorOutputsCommitmentFormat, localCommitParams, localCommit, remoteCommitParams, remoteCommit, None)),
          inactive = Nil,
          Right(dummyPublicKey),
          ShaChain.init,
          Map.empty,
        ),
        ShortIdAliases(Alias(42), None),
        None,
        ChannelUpdate(ByteVector64(hex"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"), Block.RegtestGenesisBlock.hash, ShortChannelId(0), 0 unixsec, ChannelUpdate.MessageFlags(dontForward = false), ChannelUpdate.ChannelFlags.DUMMY, CltvExpiryDelta(12), 1 msat, 100 msat, 0, 2_000_000 msat),
        SpliceStatus.NoSplice, None, None, None
      )
    )
    val expected =
      """{
        | "nodeId": "0270685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b",
        | "channelId": "345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f",
        | "state": "NORMAL",
        | "data": {
        |   "type": "DATA_NORMAL",
        |   "commitments": {
        |     "channelParams": {
        |       "channelId": "0202020202020202020202020202020202020202020202020202020202020202",
        |       "channelConfig": ["funding_pubkey_based_channel_keypath"],
        |       "channelFeatures": [],
        |       "localParams": {
        |         "nodeId": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "fundingKeyPath": [42],
        |         "initialRequestedChannelReserve_opt": 1000,
        |         "isChannelOpener": true,
        |         "paysCommitTxFees" : true,
        |         "initFeatures": { "activated": {}, "unknown": [] }
        |       },
        |       "remoteParams": {
        |         "nodeId": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "initialRequestedChannelReserve_opt": 1000,
        |         "revocationBasepoint": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "paymentBasepoint": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "delayedPaymentBasepoint": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "htlcBasepoint": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |         "initFeatures": { "activated": {}, "unknown": [] }
        |       },
        |       "channelFlags": {
        |         "nonInitiatorPaysCommitFees": false,
        |         "announceChannel": true
        |       }
        |     },
        |     "changes": {
        |       "localChanges": { "proposed": [], "signed": [], "acked": [] },
        |       "remoteChanges": { "proposed": [], "acked": [], "signed": [] },
        |       "localNextHtlcId": 1,
        |       "remoteNextHtlcId": 1
        |     },
        |     "active": [
        |       {
        |         "fundingTxIndex": 0,
        |         "fundingInput": "0202020202020202020202020202020202020202020202020202020202020202:0",
        |         "fundingAmount": 150000,
        |         "localFunding": { "status":"unconfirmed" },
        |         "remoteFunding": { "status":"locked" },
        |         "commitmentFormat": "anchor_outputs",
        |         "localCommitParams": {
        |           "dustLimit": 546,
        |           "htlcMinimum": 1,
        |           "maxHtlcValueInFlight": 9223372036854775807,
        |           "maxAcceptedHtlcs": 50,
        |           "toSelfDelay": 144
        |         },
        |         "localCommit": {
        |           "index": 0,
        |           "spec": { "htlcs": [], "commitTxFeerate": 2500, "toLocal": 100000000, "toRemote": 50000000 },
        |           "txId": "0202020202020202020202020202020202020202020202020202020202020202",
        |           "remoteSig": {
        |             "sig": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        |           },
        |           "htlcRemoteSigs": []
        |         },
        |         "remoteCommitParams": {
        |           "dustLimit": 546,
        |           "htlcMinimum": 1,
        |           "maxHtlcValueInFlight": 18446744073709551615,
        |           "maxAcceptedHtlcs": 50,
        |           "toSelfDelay": 144
        |         },
        |         "remoteCommit": {
        |           "index": 0,
        |           "spec": { "htlcs": [], "commitTxFeerate": 2500, "toLocal": 50000000, "toRemote": 100000000 },
        |           "txId": "0202020202020202020202020202020202020202020202020202020202020202",
        |           "remotePerCommitmentPoint": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f"
        |         }
        |       }
        |     ],
        |     "inactive": [],
        |     "remoteNextCommitInfo": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
        |     "remotePerCommitmentSecrets": null,
        |     "originChannels": {}
        |   },
        |   "aliases": { "localAlias": "0x2a" },
        |   "channelUpdate": {
        |     "signature": "345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f",
        |     "chainHash": "06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f",
        |     "shortChannelId": "0x0x0",
        |     "timestamp": { "iso": "1970-01-01T00:00:00Z", "unix": 0 },
        |     "messageFlags": { "dontForward": false },
        |     "channelFlags": { "isEnabled": true, "isNode1": true },
        |     "cltvExpiryDelta": 12,
        |     "htlcMinimumMsat": 1,
        |     "feeBaseMsat": 100,
        |     "feeProportionalMillionths": 0,
        |     "htlcMaximumMsat": 2000000,
        |     "tlvStream": {}
        |   }
        | }
        |}""".stripMargin
    val json = JsonSerializers.serialization.write(channelInfo)(JsonSerializers.formats)
    assertJsonEquals(json, expected)
  }

  test("DirectedHtlc serialization") {
    val add = UpdateAddHtlc(
      channelId = ByteVector32(hex"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"),
      id = 926,
      amountMsat = 12365.msat,
      paymentHash = ByteVector32(hex"9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692"),
      cltvExpiry = CltvExpiry(621500),
      onionRoutingPacket = OnionRoutingPacket(
        version = 0,
        publicKey = hex"0270685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b",
        payload = hex"3c7a66997c681a3de1bae56438abeee4fc50a16554725a430ade1dc8db6bdd76704d45c6151c4051d710cf487e63f8cbe9f5e537e6e518d7998f11c40277d551bee036d227a421f344c0185b4533660d200acbc4f4aa6148e29f813bb537e950a79ba961b80ccaa6ad808cb88f858ee73f8b1f129d3214d194f76fc011c46e18c2caec0fcb69715e79cb381e449e5be20281e0aaa92defa089c98b7e29c22181f2d1af9f5fe2a37ede4ac3163b123aa72318201b1128b17053c381e7bf111620dfb7ea3dcc5c28cafdd9cb7bb1a4202b64199aa02af145c563ba1b9f10288203ce2666f486aacb2ee385dc0b67915864c95174dfaac1e0ea195329d1741cd1febb4b49b33f84e0d10a5ec8ee0a1a94f73abf081ec69bb863edfeb46d24ce424b025ac3f593a7ba9419ec9b17fb39f0fbeac80e0898f95b6709cbc95f7c097e22e3a6ca0efbc947bbcd4a9077f6bd9daba25b18bb16179fca9d9cb2ce49fc7cbd2de589237926cacb87ea60e2cc60a90b47575517921b5529b8a95823dd0c3d02a7747d74c4ca927ba6b70c06c1c1ef27e14d371e8dd8f5d9380a65b08ae1e6384f9b3575c5d7278de22ce80e63612a27f3b3f45dbe32ee855185293c719e5a7203a682a08fd810c46fa12b67e61349831f8fae3f558090ea988e1a22ec877b790ea09169055529247c4dd597857aad74eaeb3a5879e96453e681e213f2796ed704d620509f34f91d9d16f881fd397e2836a0a4d2f1bcd230067f7acb5381a2b17e8c5135e38c4d258afbe4f69ac7ad39b789e99686ee926b3ad31b98993673313b7b18a4faaea238d8055824fde7339a791fc7777ef28cc4a1a5d177b3c3882ced4921c6cd85ae82e1fe13fe680ae432a9918ce37b15f88d4d18fb16b69e5369d18c204aaf7ee49b830bf2328380e6ad96e8f6a9e01bc2c97ffbaa402d5406dc7b83c6eb5d515ffc3bea8c42cf299c9e2bea693515246c6ff859d33ba6c4da4c4c1706e0c6b4a574e927f02eb92b7d56722cff80c3e6f6b98d1c84cb576abdcc27a6bc7b110fc2ac5fead57f05ad854c3331ce1ff94c0dc97303540ee797d71566497af09f20e3554d467528e1fed8e69438171072fe2deca3979a8f5ec9043b9bc4da921b095c29dc0294148c1b7001dafda4c48600d1194f745e6d0689c561bf19d20758c4d25fac64d81780607a4106e220ef546fc4026af7b9da8defb2fe3c21d48798ac67c794fb40aabe44618a8911673466be06808c6f54a772b87bcfafb4d120a9bebffb8051bf24bb332eaa769cf175c1aadb0186f8946dc32513fd81fe1a61bfb860886bdd070359a43e06e74607d300bd2e01a3f1ee900c4039e8db742170228db61ef0c77724c49d1573144564a80cc1ebc0449b34f84be35187ceba3fbc2facf5ad1f1e15945e3c6c236579aca7bc97e4cc76a3310022693b64008562b254a7d11c0086813e551c4817bbb72a1d6fbfc84d326ce973651200f80aa8ab0976c53c390249ca8e7e5ec21b80e70c3e0205983d313b28a5d1b9d9149501e05d3257c8ae88c6308e9e00feeab19121d1032a582e68ca1f9f64a1fd91cb5d8613b985fd4be22a4d5c14a132c20811a75ee3cc61de0b3fbc3254d61995d086603032269888b942ec0971ad26ea4b8df1746c5ec1de904ddeb5045abc0a6ede9d6a199ed0782cb69efa3a4dc00747553dbef12fb8299ca364b4cdf2ac3eba03b0d8b273684116bba4458b5717bc4aca5406901173a89b3643ccc076f22779fccf1ad69981e24eef18c711a2d58dfe5834b41f9e7166d54dc8628e754baaca1cbb7db8256f88ebc889de6078ba83a1af14a4",
        hmac = ByteVector32(hex"9442626f72c475963dbddf8a57ab2cef3013eb3d6a5e8afbea9e631dac4481f5")
      ),
      pathKey_opt = None,
      endorsement = 6,
      fundingFee_opt = None,
    )

    val expectedIn = """{"direction":"IN","id":926,"amountMsat":12365,"paymentHash":"9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692","cltvExpiry":621500}"""
    JsonSerializers.serialization.write(IncomingHtlc(add))(JsonSerializers.formats) shouldBe expectedIn
    JsonSerializers.serialization.write(OutgoingHtlc(add))(JsonSerializers.formats) shouldBe expectedIn.replace("IN", "OUT")
  }

  test("HTLC origin serialization") {
    val localOrigin = Origin.Cold(Upstream.Local(UUID.fromString("11111111-1111-1111-1111-111111111111")))
    val expectedLocalOrigin = """{"paymentId":"11111111-1111-1111-1111-111111111111"}"""
    JsonSerializers.serialization.write(localOrigin)(org.json4s.DefaultFormats + OriginSerializer) shouldBe expectedLocalOrigin

    val channelOrigin = Origin.Cold(Upstream.Cold.Channel(ByteVector32(hex"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"), 7, 500 msat))
    val expectedChannelOrigin = """{"channelId":"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f","htlcId":7,"amount":500}"""
    JsonSerializers.serialization.write(channelOrigin)(org.json4s.DefaultFormats + OriginSerializer) shouldBe expectedChannelOrigin

    val relayedHtlcs = List(
      Upstream.Cold.Channel(ByteVector32(hex"9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692"), 3, 600 msat),
      Upstream.Cold.Channel(ByteVector32(hex"70685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b"), 7, 500 msat),
    )
    val trampolineOrigin = Origin.Cold(Upstream.Cold.Trampoline(relayedHtlcs))
    val expectedTrampolineOrigin = """[{"channelId":"9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692","htlcId":3,"amount":600},{"channelId":"70685ca81a8e4d4d01beec5781f4cc924684072ae52c507f8ebe9daf0caaab7b","htlcId":7,"amount":500}]"""
    JsonSerializers.serialization.write(trampolineOrigin)(org.json4s.DefaultFormats + OriginSerializer) shouldBe expectedTrampolineOrigin
  }

  test("InputInfo serialization") {
    val inputInfo = InputInfo(
      outPoint = OutPoint(TxHash.fromValidHex("345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"), 42),
      txOut = TxOut(456651 sat, hex"3c7a66997c681a3de1bae56438abeee4fc50a16554725a430ade1dc8db6bdd76704d45c6151c4051d710cf487e63"),
    )
    JsonSerializers.serialization.write(inputInfo)(JsonSerializers.formats) shouldBe """{"outPoint":"9f0b9c0ce92c175ca4e78acfd13a718099c73818b6d3140cfe6f04ec052b5b34:42","amountSatoshis":456651}"""
  }

  test("Features serialization") {
    val features = Features(
      activated = Map(
        Features.InitialRoutingSync -> FeatureSupport.Optional,
        Features.PaymentSecret -> FeatureSupport.Mandatory,
        Features.StaticRemoteKey -> FeatureSupport.Optional
      ),
      unknown = Set(
        UnknownFeature(457),
        UnknownFeature(5000),
      )
    )

    JsonSerializers.serialization.write(features)(JsonSerializers.formats) shouldBe """{"activated":{"initial_routing_sync":"optional","payment_secret":"mandatory","option_static_remotekey":"optional"},"unknown":[457,5000]}"""
  }

  test("Bolt 11 invoice") {
    val ref = "lnbcrt50n1p0fm9cdpp5al3wvsfkc6p7fxy89eu8gm4aww9mseu9syrcqtpa4mvx42qelkwqdq9v9ekgxqrrss9qypqsqsp5wl2t45v0hj4lgud0zjxcnjccd29ts0p2kh4vpw75vnhyyzyjtjtqarpvqg33asgh3z5ghfuvhvtf39xtnu9e7aqczpgxa9quwsxkd9rnwmx06pve9awgeewxqh90dqgrhzgsqc09ek6uejr93z8puafm6gsqgrk0hy"
    val pr = Invoice.fromString(ref).get
    JsonSerializers.serialization.write(pr)(JsonSerializers.formats) shouldBe """{"prefix":"lnbcrt","timestamp":1587386125,"nodeId":"03b207771ddba774e318970e9972da2491ff8e54f777ad0528b6526773730248a0","serialized":"lnbcrt50n1p0fm9cdpp5al3wvsfkc6p7fxy89eu8gm4aww9mseu9syrcqtpa4mvx42qelkwqdq9v9ekgxqrrss9qypqsqsp5wl2t45v0hj4lgud0zjxcnjccd29ts0p2kh4vpw75vnhyyzyjtjtqarpvqg33asgh3z5ghfuvhvtf39xtnu9e7aqczpgxa9quwsxkd9rnwmx06pve9awgeewxqh90dqgrhzgsqc09ek6uejr93z8puafm6gsqgrk0hy","description":"asd","paymentHash":"efe2e64136c683e498872e78746ebd738bb867858107802c3daed86aa819fd9c","expiry":3600,"amount":5000,"features":{"activated":{"var_onion_optin":"optional","payment_secret":"optional"},"unknown":[]},"routingInfo":[]}"""
  }

  test("Bolt 11 invoice with routing hints") {
    val ref = "lntb1pst2q8xpp5qysan6j5xeq97tytxf7pfr0n75na8rztqhh03glmlgsqsyuqzgnqdqqxqrrss9qy9qsqsp5qq67gcxrn2drj5p0lc6p8wgdpqwxnc2h4s9kra5489q0fqsvhumsrzjqfqnj4upt5z6hdludky9vgk4ehzmwu2dk9rcevzczw5ywstehq79c83xr5qqqkqqqqqqqqlgqqqqqeqqjqrzjqwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cng838tqqqqxgqqqqqqqlgqqqqqeqqjqkxs4223x2r6sat65asfp0k2pze2rswe9np9vq08waqvsp832ffgymzgx8hgzejasesfxwcw6jj93azwq9klwuzmef3llns3n95pztgqpawp7an"
    val pr = Invoice.fromString(ref).get
    JsonSerializers.serialization.write(pr)(JsonSerializers.formats) shouldBe """{"prefix":"lntb","timestamp":1622474982,"nodeId":"03e89e4c3d41dc5332c2fb6cc66d12bfb9257ba681945a242f27a08d5ad210d891","serialized":"lntb1pst2q8xpp5qysan6j5xeq97tytxf7pfr0n75na8rztqhh03glmlgsqsyuqzgnqdqqxqrrss9qy9qsqsp5qq67gcxrn2drj5p0lc6p8wgdpqwxnc2h4s9kra5489q0fqsvhumsrzjqfqnj4upt5z6hdludky9vgk4ehzmwu2dk9rcevzczw5ywstehq79c83xr5qqqkqqqqqqqqlgqqqqqeqqjqrzjqwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cng838tqqqqxgqqqqqqqlgqqqqqeqqjqkxs4223x2r6sat65asfp0k2pze2rswe9np9vq08waqvsp832ffgymzgx8hgzejasesfxwcw6jj93azwq9klwuzmef3llns3n95pztgqpawp7an","description":"","paymentHash":"0121d9ea5436405f2c8b327c148df3f527d38c4b05eef8a3fbfa200813801226","expiry":3600,"features":{"activated":{"var_onion_optin":"optional","payment_secret":"optional","basic_mpp":"optional"},"unknown":[]},"routingInfo":[[{"nodeId":"02413957815d05abb7fc6d885622d5cdc5b7714db1478cb05813a8474179b83c5c","shortChannelId":"1975837x88x0","feeBase":1000,"feeProportionalMillionths":100,"cltvExpiryDelta":144}],[{"nodeId":"03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134","shortChannelId":"1976152x25x0","feeBase":1000,"feeProportionalMillionths":100,"cltvExpiryDelta":144}]]}"""
  }

  test("Bolt 11 invoice with metadata") {
    val ref = "lnbc10m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdp9wpshjmt9de6zqmt9w3skgct5vysxjmnnd9jx2mq8q8a04uqnp4q0n326hr8v9zprg8gsvezcch06gfaqqhde2aj730yg0durunfhv66sp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs9q2gqqqqqqsgqy9gw6ymamd20jumvdgpfphkhp8fzhhdhycw36egcmla5vlrtrmhs9t7psfy3hkkdqzm9eq64fjg558znccds5nhsfmxveha5xe0dykgpspdha0"
    val pr = Invoice.fromString(ref).get
    JsonSerializers.serialization.write(pr)(JsonSerializers.formats) shouldBe """{"prefix":"lnbc","timestamp":1496314658,"nodeId":"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad","serialized":"lnbc10m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdp9wpshjmt9de6zqmt9w3skgct5vysxjmnnd9jx2mq8q8a04uqnp4q0n326hr8v9zprg8gsvezcch06gfaqqhde2aj730yg0durunfhv66sp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs9q2gqqqqqqsgqy9gw6ymamd20jumvdgpfphkhp8fzhhdhycw36egcmla5vlrtrmhs9t7psfy3hkkdqzm9eq64fjg558znccds5nhsfmxveha5xe0dykgpspdha0","description":"payment metadata inside","paymentHash":"0001020304050607080900010203040506070809000102030405060708090102","paymentMetadata":"01fafaf0","amount":1000000000,"features":{"activated":{"var_onion_optin":"mandatory","payment_secret":"mandatory","option_payment_metadata":"mandatory"},"unknown":[]},"routingInfo":[]}"""
  }

  test("Bolt 12 invoice") {
    val ref = "lni1qqsf4h8fsnpjkj057gjg9c3eqhv889440xh0z6f5kng9vsaad8pgq7sgqsdjuqsqpgxk66twd9kkzmpqdanxvetjzcss83y2e9lqnu7tht4ntvp24fksw26hwf5yrg6dyk2jz472efs2rjh42qsxlc5vp2m0rvmjcxn2y34wv0m5lyc7sdj7zksgn35dvxgqqqqqqqzjqsdjupkjtqssx05572ha26x39rczan5yft22pgwa72jw8gytavkm5ydn7yf5kpgh5zsq83y2e9lqnu7tht4ntvp24fksw26hwf5yrg6dyk2jz472efs2rjh4q2rd3ny0elv9m7mh38xxwe6ypfheeqeqlwgft05r6dhc50gtw0nv2qgrrl9x2qzzqvwukam32mhkdqrvwwcp5l6jcnnnezdq69vz8gdvvgmsqwk3efqf3f6gmf0ul63940awz429rdhhsts86s0r30e5nffwhrqw90xgxf7f60sm7tcclvyqwz7cer5q9223madstdy2p5q6y8qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqf2qheqqqqq2gprrgshynfszqyk2sgpvkrnmq53kv7r52rpnmtmd9ukredsnygsnymsurdy6e9la6l4hyz4qgxewqmftqggrcj9vjlsf709m46e4kq425mg89dthy6zp5dxjt9fp2l9v5c9pet6lqsx4k5r7rsld3hhe87psyy5cnhhzt4dz838f75734mted7pdsrflpvys23tkafmhctf3musnsaa42h6qjdggyqlhtevutzzpzlnwd8alq"
    val pr = Invoice.fromString(ref).get
    JsonSerializers.serialization.write(pr)(JsonSerializers.formats) shouldBe """{"amount":456001234,"nodeId":"03c48ac97e09f3cbbaeb35b02aaa6d072b57726841a34d25952157caca60a1caf5","paymentHash":"2cb0e7b052366787450c33daf6d2f2c3cb6132221326e1c1b49ac97fdd7eb720","description":"minimal offer","features":{"activated":{},"unknown":[]},"blindedPaths":[{"introductionNodeId":"03c48ac97e09f3cbbaeb35b02aaa6d072b57726841a34d25952157caca60a1caf5","blindedNodeIds":["031fca650042031dcb777156ef66806c73b01a7f52c4e73c89a0d15823a1ac6237"]}],"createdAt":1665412681,"expiresAt":1665412981,"serialized":"lni1qqsf4h8fsnpjkj057gjg9c3eqhv889440xh0z6f5kng9vsaad8pgq7sgqsdjuqsqpgxk66twd9kkzmpqdanxvetjzcss83y2e9lqnu7tht4ntvp24fksw26hwf5yrg6dyk2jz472efs2rjh42qsxlc5vp2m0rvmjcxn2y34wv0m5lyc7sdj7zksgn35dvxgqqqqqqqzjqsdjupkjtqssx05572ha26x39rczan5yft22pgwa72jw8gytavkm5ydn7yf5kpgh5zsq83y2e9lqnu7tht4ntvp24fksw26hwf5yrg6dyk2jz472efs2rjh4q2rd3ny0elv9m7mh38xxwe6ypfheeqeqlwgft05r6dhc50gtw0nv2qgrrl9x2qzzqvwukam32mhkdqrvwwcp5l6jcnnnezdq69vz8gdvvgmsqwk3efqf3f6gmf0ul63940awz429rdhhsts86s0r30e5nffwhrqw90xgxf7f60sm7tcclvyqwz7cer5q9223madstdy2p5q6y8qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqf2qheqqqqq2gprrgshynfszqyk2sgpvkrnmq53kv7r52rpnmtmd9ukredsnygsnymsurdy6e9la6l4hyz4qgxewqmftqggrcj9vjlsf709m46e4kq425mg89dthy6zp5dxjt9fp2l9v5c9pet6lqsx4k5r7rsld3hhe87psyy5cnhhzt4dz838f75734mted7pdsrflpvys23tkafmhctf3musnsaa42h6qjdggyqlhtevutzzpzlnwd8alq"}"""
  }

  test("Bolt 12 offer") {
    val minimalOffer = Offer(TlvStream[OfferTlv](OfferTypes.OfferNodeId(PublicKey(hex"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f"))))
    JsonSerializers.serialization.write(minimalOffer)(JsonSerializers.formats) shouldBe """{"nodeId":"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f"}"""

    val ref = "lno1pqzqzltcgq9q6urvv4shxefqv3hkuct5v58qxrp4qqfquctvd93k2srpvd5kuufwvdh3vggzg2hd49ueds8phzcahvh4p2m3pnen649dza2h3k6gxpaequr8fhtq"
    val offer = Offer.decode(ref).get
    JsonSerializers.serialization.write(offer)(JsonSerializers.formats) shouldBe """{"amount":"25000.000","currency":"satoshi","description":"please donate","expiry":{"iso":"1970-01-10T06:13:20Z","unix":800000},"issuer":"alice@acinq.co","nodeId":"0242aeda97996c0e1b8b1dbb2f50ab710cf33d54ad175578db48307b9070674dd6"}"""

    val bigOffer = Offer(TlvStream(Set[OfferTlv](
      OfferTypes.OfferChains(Seq(Block.Testnet4GenesisBlock.hash)),
      OfferTypes.OfferMetadata(hex"d5f4a6"),
      OfferTypes.OfferCurrency(Currency.getInstance("EUR")),
      OfferTypes.OfferAmount(86205),
      OfferTypes.OfferDescription("offer with a lot of fields in it"),
      OfferTypes.OfferFeatures(Features(Features.ProvideStorage -> FeatureSupport.Mandatory).toByteVector),
      OfferTypes.OfferAbsoluteExpiry(TimestampSecond(3600)),
      OfferTypes.OfferPaths(Seq(Sphinx.RouteBlinding.BlindedRoute(EncodedNodeId.WithPublicKey.Plain(PublicKey(hex"022812e3a3760ac989b8749ee9fc70fd12e4d7f3cad5e3e2bf572e9e4eaaa7b7d9")), PublicKey(hex"028a2b20b2debdfd97de08f6e2374f2946116492f358b78acf9eac05f6fdac632d"), Seq(Sphinx.RouteBlinding.BlindedHop(PublicKey(hex"031b27d9e97dbb0ef87c48bb0231c96c6bca1ee54b0e0cfe869ad2388ce247719f"), hex"def5"))))),
      OfferTypes.OfferIssuer("bob@bobcorp.com"),
      OfferTypes.OfferQuantityMax(5),
      OfferTypes.OfferNodeId(PublicKey(hex"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f")),
    ), Set(GenericTlv(UInt64(71), hex"bd4e85ce"))))
    JsonSerializers.serialization.write(bigOffer)(JsonSerializers.formats) shouldBe """{"chains":["43f08bdab050e35b567c864b91f47f50ae725ae2de53bcfbbaf284da00000000"],"amount":"862.05","currency":"EUR","description":"offer with a lot of fields in it","expiry":{"iso":"1970-01-01T01:00:00Z","unix":3600},"issuer":"bob@bobcorp.com","nodeId":"03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f","paths":[{"firstNodeId":{"publicKey":"022812e3a3760ac989b8749ee9fc70fd12e4d7f3cad5e3e2bf572e9e4eaaa7b7d9"},"length":1}],"quantityMax":5,"features":{"activated":{"option_provide_storage":"mandatory"},"unknown":[]},"metadata":"d5f4a6","unknownTlvs":{"71":"bd4e85ce"}}"""
  }

  test("Bolt 12 offer data") {
    val ref = "lno1pqzqzltcgq9q6urvv4shxefqv3hkuct5v58qxrp4qqfquctvd93k2srpvd5kuufwvdh3vggzg2hd49ueds8phzcahvh4p2m3pnen649dza2h3k6gxpaequr8fhtq"
    val offer = OfferData(Offer.decode(ref).get, None, createdAt = TimestampMilli(100), disabledAt_opt = None)
    JsonSerializers.serialization.write(offer)(JsonSerializers.formats) shouldBe """{"amountMsat":25000000,"description":"please donate","issuer":"alice@acinq.co","nodeId":"0242aeda97996c0e1b8b1dbb2f50ab710cf33d54ad175578db48307b9070674dd6","createdAt":{"iso":"1970-01-01T00:00:00.100Z","unix":0},"expiry":{"iso":"1970-01-10T06:13:20Z","unix":800000},"disabled":false,"encoded":"lno1pqzqzltcgq9q6urvv4shxefqv3hkuct5v58qxrp4qqfquctvd93k2srpvd5kuufwvdh3vggzg2hd49ueds8phzcahvh4p2m3pnen649dza2h3k6gxpaequr8fhtq"}"""
    val disabledOffer = offer.copy(disabledAt_opt = Some(TimestampMilli(200)))
    JsonSerializers.serialization.write(disabledOffer)(JsonSerializers.formats) shouldBe """{"amountMsat":25000000,"description":"please donate","issuer":"alice@acinq.co","nodeId":"0242aeda97996c0e1b8b1dbb2f50ab710cf33d54ad175578db48307b9070674dd6","createdAt":{"iso":"1970-01-01T00:00:00.100Z","unix":0},"expiry":{"iso":"1970-01-10T06:13:20Z","unix":800000},"disabled":true,"disabledAt":{"iso":"1970-01-01T00:00:00.200Z","unix":0},"encoded":"lno1pqzqzltcgq9q6urvv4shxefqv3hkuct5v58qxrp4qqfquctvd93k2srpvd5kuufwvdh3vggzg2hd49ueds8phzcahvh4p2m3pnen649dza2h3k6gxpaequr8fhtq"}"""
    val pathId = ByteVector32.fromValidHex("5d370c0e1c64280acce1638bc6f225360d8219e572394e8077b4bb07da867926")
    val privateRef = "lno1pqzqzltcgq9pwurvv4shxefqv3hkuct5v5s8qunfweshgetv0yggwqunzcwg835jzj83htxa3gh850kht0epmvl82skjqfdgwuwxukmv4ypp7yufyhnq0tygxh2g98tdjx2hzerf2rs4dqum8xlcd5eu56s0s3cpqtas0eecjjn25r5jstankpp7rw4wr3wtefyjffhsnmr4ekjfzw2dcqpp8g9rm5cmsv02e6jmfe40hg6uxnwkalt5cc2l0zx8ju7xazfycrw5j"
    val privateOffer = OfferData(Offer.decode(privateRef).get, Some(pathId), createdAt = TimestampMilli(150), disabledAt_opt = None)
    JsonSerializers.serialization.write(privateOffer)(JsonSerializers.formats) shouldBe """{"amountMsat":25000000,"description":"please donate privately","blindedPathFirstNodeId":"0393161c83c692148f1bacdd8a2e7a3ed75bf21db3e7542d2025a8771c6e5b6ca9","createdAt":{"iso":"1970-01-01T00:00:00.150Z","unix":0},"disabled":false,"encoded":"lno1pqzqzltcgq9pwurvv4shxefqv3hkuct5v5s8qunfweshgetv0yggwqunzcwg835jzj83htxa3gh850kht0epmvl82skjqfdgwuwxukmv4ypp7yufyhnq0tygxh2g98tdjx2hzerf2rs4dqum8xlcd5eu56s0s3cpqtas0eecjjn25r5jstankpp7rw4wr3wtefyjffhsnmr4ekjfzw2dcqpp8g9rm5cmsv02e6jmfe40hg6uxnwkalt5cc2l0zx8ju7xazfycrw5j"}"""
  }

  test("GlobalBalance serializer") {
    val gb = GlobalBalance(
      onChain = CheckBalance.DetailedOnChainBalance(
        deeplyConfirmed = Map(OutPoint(TxId.fromValidHex("9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692"), 3) -> Btc(1.4)),
        recentlyConfirmed = Map(OutPoint(TxId.fromValidHex("4d176ad844c363bed59edf81962b008faa6194c3b3757ffcd26ba60f95716db2"), 5) -> Btc(0.7)),
        unconfirmed = Map(OutPoint(TxId.fromValidHex("345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f"), 1) -> Btc(0.05)),
        utxos = Seq.empty,
        recentlySpentInputs = Set.empty,
      ),
      offChain = CheckBalance.OffChainBalance(
        normal = MainAndHtlcBalance(
          toLocal = Btc(0.2),
          htlcs = Btc(0.05)
        ),
        closing = MainAndHtlcBalance(
          toLocal = Btc(0.3),
          htlcs = Btc(0.07)
        )
      ),
      channels = Map.empty, // not used by json serializer
    )
    JsonSerializers.serialization.write(gb)(JsonSerializers.formats) shouldBe """{"total":2.77,"onChain":{"total":2.15,"deeplyConfirmed":{"9fcd45bbaa09c60c991ac0425704163c3f3d2d683c789fa409455b9c97792692:3":1.4},"recentlyConfirmed":{"4d176ad844c363bed59edf81962b008faa6194c3b3757ffcd26ba60f95716db2:5":0.7},"unconfirmed":{"345b2b05ec046ffe0c14d3b61838c79980713ad1cf8ae7a45c172ce90c9c0b9f:1":0.05}},"offChain":{"waitForFundingConfirmed":0.0,"waitForChannelReady":0.0,"normal":{"toLocal":0.2,"htlcs":0.05},"shutdown":{"toLocal":0.0,"htlcs":0.0},"negotiating":{"toLocal":0.0,"htlcs":0.0},"closing":{"toLocal":0.3,"htlcs":0.07},"waitForPublishFutureCommitment":0.0}}"""
  }

  test("type hints") {
    val e1 = PaymentSettlingOnChain(UUID.randomUUID, 42 msat, randomBytes32())
    assert(JsonSerializers.serialization.writePretty(e1)(JsonSerializers.formats).contains("\"type\" : \"payment-settling-onchain\""))
  }

  test("transaction serializer") {
    val tx = Transaction.read("0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800")
    assertJsonEquals(JsonSerializers.serialization.write(tx)(JsonSerializers.formats), "{\"txid\":\"3ef63b5d297c9dcf93f33b45b9f102733c36e8ef61da1ccf2bc132a10584be18\",\"tx\":\"0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800\"}")
  }

  test("TransactionWithInputInfo serializer") {
    // the input info is ignored when serializing to JSON
    val dummyInputInfo = InputInfo(OutPoint(TxId(ByteVector32.Zeroes), 0), TxOut(Satoshi(0), Nil))

    val htlcSuccessTx = Transaction.read("0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800")
    val htlcSuccessTxInfo = UnsignedHtlcSuccessTx(dummyInputInfo, htlcSuccessTx, ByteVector32.One, 3, CltvExpiry(1105), ZeroFeeHtlcTxAnchorOutputsCommitmentFormat)
    val htlcSuccessJson =
      s"""{
         |  "txid": "${htlcSuccessTx.txid.value.toHex}",
         |  "tx": "0200000001c8a8934fb38a44b969528252bc37be66ee166c7897c57384d1e561449e110c93010000006b483045022100dc6c50f445ed53d2fb41067fdcb25686fe79492d90e6e5db43235726ace247210220773d35228af0800c257970bee9cf75175d75217de09a8ecd83521befd040c4ca012102082b751372fe7e3b012534afe0bb8d1f2f09c724b1a10a813ce704e5b9c217ccfdffffff0247ba2300000000001976a914f97a7641228e6b17d4b0b08252ae75bd62a95fe788ace3de24000000000017a914a9fefd4b9a9282a1d7a17d2f14ac7d1eb88141d287f7d50800",
         |  "paymentHash": "0100000000000000000000000000000000000000000000000000000000000000",
         |  "htlcId": 3,
         |  "htlcExpiry": 1105
         |}
    """.stripMargin
    assertJsonEquals(JsonSerializers.serialization.write(htlcSuccessTxInfo)(JsonSerializers.formats), htlcSuccessJson)

    val claimHtlcTimeoutTx = Transaction.read("010000000110f01d4a4228ef959681feb1465c2010d0135be88fd598135b2e09d5413bf6f1000000006a473044022074658623424cebdac8290488b76f893cfb17765b7a3805e773e6770b7b17200102202892cfa9dda662d5eac394ba36fcfd1ea6c0b8bb3230ab96220731967bbdb90101210372d437866d9e4ead3d362b01b615d24cc0d5152c740d51e3c55fb53f6d335d82ffffffff01408b0700000000001976a914678db9a7caa2aca887af1177eda6f3d0f702df0d88ac00000000")
    val claimHtlcTimeoutTxInfo = ClaimHtlcTimeoutTx(null, dummyInputInfo, claimHtlcTimeoutTx, ByteVector32.One, 2, CltvExpiry(144), ZeroFeeHtlcTxAnchorOutputsCommitmentFormat)
    val claimHtlcTimeoutJson =
      s"""{
         |  "txid": "${claimHtlcTimeoutTx.txid.value.toHex}",
         |  "tx": "010000000110f01d4a4228ef959681feb1465c2010d0135be88fd598135b2e09d5413bf6f1000000006a473044022074658623424cebdac8290488b76f893cfb17765b7a3805e773e6770b7b17200102202892cfa9dda662d5eac394ba36fcfd1ea6c0b8bb3230ab96220731967bbdb90101210372d437866d9e4ead3d362b01b615d24cc0d5152c740d51e3c55fb53f6d335d82ffffffff01408b0700000000001976a914678db9a7caa2aca887af1177eda6f3d0f702df0d88ac00000000",
         |  "paymentHash": "0100000000000000000000000000000000000000000000000000000000000000",
         |  "htlcId": 2,
         |  "htlcExpiry": 144
         |}
    """.stripMargin
    assertJsonEquals(JsonSerializers.serialization.write(claimHtlcTimeoutTxInfo)(JsonSerializers.formats), claimHtlcTimeoutJson)

    val closingTx = Transaction.read("0100000001be43e9788523ed4de0b24a007a90009bc25e667ddac0e9ee83049be03e220138000000006b483045022100f74dd6ad3e6a00201d266a0ed860a6379c6e68b473970423f3fc8a15caa1ea0f022065b4852c9da230d9e036df743cb743601ca5229e1cb610efdd99769513f2a2260121020636de7755830fb4a3f136e97ecc6c58941611957ba0364f01beae164b945b2fffffffff0150f80c000000000017a9146809053148799a10480eada3d56d15edf4a648c88700000000")
    val closingTxWithLocalOutput = ClosingTx(dummyInputInfo, closingTx, Some(0))
    val closingTxWithLocalOutputJson =
      s"""{
         |  "txid": "${closingTx.txid.value.toHex}",
         |  "tx": "0100000001be43e9788523ed4de0b24a007a90009bc25e667ddac0e9ee83049be03e220138000000006b483045022100f74dd6ad3e6a00201d266a0ed860a6379c6e68b473970423f3fc8a15caa1ea0f022065b4852c9da230d9e036df743cb743601ca5229e1cb610efdd99769513f2a2260121020636de7755830fb4a3f136e97ecc6c58941611957ba0364f01beae164b945b2fffffffff0150f80c000000000017a9146809053148799a10480eada3d56d15edf4a648c88700000000",
         |  "toLocalOutput": {
         |    "amount": 850000,
         |    "publicKeyScript": "a9146809053148799a10480eada3d56d15edf4a648c887"
         |  }
         |}
    """.stripMargin
    assertJsonEquals(JsonSerializers.serialization.write(closingTxWithLocalOutput)(JsonSerializers.formats), closingTxWithLocalOutputJson)

    val closingTxWithoutLocalOutput = ClosingTx(dummyInputInfo, closingTx, None)
    val closingTxWithoutLocalOutputJson =
      s"""{
         |  "txid": "${closingTx.txid.value.toHex}",
         |  "tx": "0100000001be43e9788523ed4de0b24a007a90009bc25e667ddac0e9ee83049be03e220138000000006b483045022100f74dd6ad3e6a00201d266a0ed860a6379c6e68b473970423f3fc8a15caa1ea0f022065b4852c9da230d9e036df743cb743601ca5229e1cb610efdd99769513f2a2260121020636de7755830fb4a3f136e97ecc6c58941611957ba0364f01beae164b945b2fffffffff0150f80c000000000017a9146809053148799a10480eada3d56d15edf4a648c88700000000"
         |}
    """.stripMargin
    assertJsonEquals(JsonSerializers.serialization.write(closingTxWithoutLocalOutput)(JsonSerializers.formats), closingTxWithoutLocalOutputJson)
  }

  test("type hints on channel data") {
    val dataNormal = hex"05000601635f355f559285ba7df0603df45ecf2a4d2e19dc5025cbfced52ae7d3518402101010002aaaa00ce2f18a967dc4f25f414e671ba6585f8ef0b8c5fb812c21064f55a2eaa0009f1be4fa2ef24fbc4722591a2c93ebf23eeaacf0e917275156fbcecfd3f4d2e7980000001ff0000000000002710c000000000186b0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000180802aa698202bbbb671d15145722fb8c28d732cddb249bcc6652ed2b297ff1f77a18371b1e63ff0000000000004e20034a9fcdb3b656feca23e62dec62f971f3da8841cfb596991db1e94b4fa31bd75a03bcb4056f62387ef42a2eb855b79a94054c114aa815e3d3f8cc7f3f61e5027d2803cd767fc0acd4f4e974ba30599c55d2ece63b974aad10d6e30424769eeb1f265103e21f886691747790cde23b2c65a95aaf8b5a3d488187a114343e0c0ad3a72912000000140800000000000000000000000000100802aa69820001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000024635f355f559285ba7df0603df45ecf2a4d2e19dc5025cbfced52ae7d351840210000000000000000000f424002c344d288048d49ce0ac2fb71a40ff0a128c9a301061e69f4949da90fbb25ab6b0400012401010101010101010101010101010101010101010101010101010101010101012a0000002b40420f0000000000220020dcda7a0f7ed8d5f0794b7337b1f32d0849906aa11b8326aa74735a82a555957f061a8000002a000000000202000000000000044c0000000000000000000000001dcd6500006402d000000000000000000000000009c4000000002faf0800000000000bebc2004c1ff676a17a9ddd84b1f1955d0ca6d2d9593a0c05ec4fbf97d7eb979752e9e40194a03db75a8577dd24c7e4e15a5c90b078d8e09e90590f9b3a29e1dec217aee94cadc472f5b379ac31bef8dd4b46b3d4c4838142176f65ea37327317de6053da000000000000000003e800000000000003e8000000003b9aca00001e009000000000000000000000000009c4000000000bebc200000000002faf0800fb278db08cea85146fd04fbf3533cb1dc3c995c0a2356dc97b48da6a0831286e02976ca9b96fb46faeedbcc9be78577da3d6a55aa84248abfa89ad0815eff9dcd3000000ff024e5ac7d7df6e211ff7a7a0a0c7c5bc338b5ca5fdafa693fc6fb212fbe778aade000000000000000103a57caafcb7e674ff01014796cf9418e3fffd01ae74496b7ab70410b6315053f0b9bab6169d3f2f518102acf70eb108e4f9720f5305eceb19c643667f20351e7f5108bdb594d71d4de15c1f3a838edbe32e0e79be60b30057c47fbe6b37896e350bcd4c039f3f6e5a83ce1ad4cc991914fd7df244387593ab9762d1309116cfcd4c93359d240c7014769e56dd6e949782042e3fd5c5c3a3c582ae450844574694311cc8fda45445246b1c28be736bb306db70afc02172b3562b1b827f37290e8c113cd5617c6bddfa32328d3607845da71ba2905d9786d785aa174393b9aecc32605d89b81ae4f7f7c727f2ee455f774176c0893a2eb330de6ed8b03882459d2734b03653b84636a0b8bcf57d8c1a09c010de4309000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f061a8000002a000002aaaa00ce2f18a967dc4f25f414e671ba6585f8ef0b8c5fb812c21064f55a2eaa02bbbb671d15145722fb8c28d732cddb249bcc6652ed2b297ff1f77a18371b1e6302c8739e013b1b3de3a3ec74f3e3c28f137b7cac16f85e89c6a0f6ab70276c79cd02c344d288048d49ce0ac2fb71a40ff0a128c9a301061e69f4949da90fbb25ab6b8866ef30667c0e95b4f5c3b959e2fa4d7c3f5dc72a0099c53a82e54c35dcd60db723c3b1582fea00d611ab7ca34a3c56dbf0d8f4362af752e192355238f2746c2006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f061a8000002a000068ba93080100009000000000000003e8000854d00000000a000000001dcd650001000000" ++ hex"e7a7822c8699669946f5e684671d63e68cc7c9cca2963945dc21c52232e6f83b1875b2bed7c80c37371a480a2e5255d49d390c3b2adfc695036ed91371cda7d79bdfbae464581f0b32942f03826aca17ab9da6ade4a778d310ec3da17fc3af426d21b347aee7c2db7b5e188e35714dc514e3a1c100e8595c9e0e4399ad796021976f077e5733ea535cc6daec2e371853dcb715fc366ea7d6b9a5b3509dccf5c2e1225e3a51de9f5bb9b6586b282a0b27a9ae7ae8f2be14ec677670241e384b462eecfde68957839b1327c9e5c622c0f67cdaf3845ddbe6f754401d720d6b6d5c061dc906bfa70fb76e1168c6ac1a25cabe8873c3c1e540ae44ae631a2638accd7951f368442dba7b38d0662ccb0140d1e4ca23f51de731a6f5adcf816c3235359afd607e58948da29a5f06c96b4312aee7d35ed4c2c811a58c5a196ac2f377d653d51cfccb5213c928955ac880b5fb1b91e88a52d5c217cbf78e071275fe626c230fded548b0f1667af1309149ff74c5542119d4e269fdc1b241d9f53e02e38e015b7c5c2d2ee623bcb4167e37edafddc7fadd642c20f81b454db1a3b578d527f124dbd1f3d99fdd1590256ae4e47c2e8b3bfe8708a0d5506d6ce8b130ce6b70028161454a5065e9925d75c0095dc24ba789489fa1e9236e25330ca1a45e61224ee027664f6589028a240961aff09187fb719ff3477b56427189b7b3c790b4031f6539c5e3a8a5d7fd99c2534ed1646920a43e7315bba98d59c51b337ba7a1b038006bb574df46830f96a5685e07ee8a0a41e712810faacfb231c67e69d0fc24b98d782c70e15524d5d2dcf4e64b4e26772dfa7067f6dc7ffc8b06e6ef3ecb13f927d466e0cd3a7ea09aaed90b7810bbfdcd8a1274bbe78a453ffff11ccee62059ec25955b34a1a1cdf8a3e506d99dcbadf16032646117556ad71cd93ceeec42be0350a6c9f194fea783558c42a56d034dcaf6fb1b28037362c7c6e2446bcda71d0a88adda3144589447ef13cb85a4d2cd16ef444097bc03e32c3b1a055e952f7ac87078b04deb900375a16dbd382ea4375ddc0a9645deca620590337e803ea8b41337f3f4e4030119a2337424dbea3d21214063ce853843dd4e6df94e3dc3bbb36d89d9eb8e15e52d0699bc6ad1de9d12afc95c8785d63756576d357126e13b25502d542774f6e5d2fdb559d52698d08600fd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee0000000000000003000000000007a120bf5899359b258acdec0ea500e437267aa6ba18e8509e15df74518f6ba7aa348f00061b1000036d768d1d63f1c9f09c252b5b48cf4d2db3f4935150c551391b37727723168982d7e58ce2a769313e461a0f3791a8c0208a769f5bdf4d57fbd0a9de104a0b1bbc1ab25ebbf87d1bc86dbbd42fd0dc0ff18a7ebfdd692c7dc3b95d095052540ce7801f3e25cbbcfd9dab857bc39624f59facbfacef5ab1e1e1f889b85f3b1f2a580cd660b73aa662fb15487722bd3c3f93d272725289136f2ee0fae4efe1afea25e6d4fc8334a47ad62d22be06605a15538dbd2a81311c4489b91d1cb143743e4570a6345c4f035c060aaf287ef66e7ebbe7b9037c10b66e087827478fdf76a02d25fe90e0f8228c1edfcb12eee3dd4e505a6c5a7bf2f5954ebb5560cd8c7f8b8f3f4ddca41a48a0d6c0e1092dcadc853752f459486bed349213cc15044585255842717ab70a3de3f0eedeecca10112c85a8bc248dc66c883a62288b49588d9fcc048c51081e94d65bd4731e7d71fba13693b82d2831d3bea370918aa5ddf1cc4f0d5015bb8dfb951ab13fbb9d26d5cb83dc980fc36f1712d616ce24d2c530253320f4f322f093a605ea426c577544f2983efc80be56791f443652c2233039a68f966c2f0b6351068616755dd2036b6226244d394a2b5b59160217603149901e8abe19a2bf404f384c2ed7fb0c5e470ee5ee8561f58f66bda729c2c8816853ad2357a009e537efcb4a28e845ca616be917b15aa6b8eb280bfcb321ea62fff21168b8ed54d58ccfdeee0e7752bfc0f02549d76615c85dd1e152a85ee931b34f436439e2233740328ba504c49f9764e1dca645ebf6a1377310ab53b68b4d0a6e6c952068249b86c29061725035db8d294ab9c56901485814735aa2a8d6987b1a19ced65a332f97751c4cd8a27093851f7775e5314078c04d254754d976bed2dbd2e6ecda62e9a0c7fd95299b4b13a54c9498d384210fb42d3b6bc5d8f0d42e42879f86c21eb7c5c6d1bffdd598b8f3cfcb75df159f1125a65f960637c62c7c5632d73b7b4b0544082008ede22d87e79e20eb08be0817650fefcd111de48ba2be02a7b080275c991a0ee4445dab89312644c7cf4101895e2dbcaad7d87e8e3b13e62751861b204a7e6f5a476eab0817c294d59aa0247903077d4cbe4a98e7984d2b04623d2b2ef4c650b43db15541ede229c12c045529b5c77993eb6acbdc28d812a486b5957fb996731980555bdd59ad824a882ebe1a77cbe6b9035f1c69dd01b2a27a47be5febfa65c721354e70071b07db4ebc2f01d143587c1b32a5337dd010d2a76a7773f4a7c665b4cfe4a61b103b1c319d85e007eb99b52400cd8776697e1d6118197655bf7bd0a5e7f4594bf36a2706128d5f5c3ee166b586c4d515611f4597a4c1088c1853a5959f73830cb973ea922d6211ee7d9b1d67b1025486f8f3c72a517d0d48d9a57d64c0f48e513c3b09e14ce91b515a87f3035ab55d241ccb12108dd299a362af26af96ada920202dfe26d456065717a85e6bbec540637059d82480f6c917a11434a9be5fee5ba33a8552b7b0e59f123991525e1dc14bfdfd109625b2df477bce565045375dacf6ffe99081914fc9f64df7ef8eb26801ce01be083555fd2f8a338a33c07f484b01a310ee420f5c932cfc5a8f6d32a20c3915a188833ac5775500c5d2b73e4ea595512e869f91f83de8e048c804ec8cd6de45b7ad264bcfb3c235325d3c09673a2a94e60736ceada065cefb1e355bd35bd4b56ae513343e85a3d840c2211da2d1941112318f97f825e1714f74fc2d33430196cca2423f43641b0d75b4b1a1a1ef0f07af31fda06220a2628aaab9f303cb4fe6d73fa9b39e8f6083af3bbca1becdd646afbd888c560bbf7cf4fcf5c02f712726eb23b03fe5c290df63a85ed1026cee07ab0d2bb868aa4dd6594252cb75ad5d11d9c53c5238047ea3d311c1443d478dd283a260270400002710000000002c2322200000000008af34a0245d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000002b40420f0000000000220020c57347ca54a9e6f279f6a1f1e50f19b48289c3baccdd356fb03033ae7ccb6e444752210252a01d9d8b03db1a99b1a82223f7dd60ecffa69dbef47c06228fdea2fe0f0215210322a747c1d7f77fc7577a689618bbeadf28b941412404ac5e216d684a32d57a8e52aefd01d9020000000001015d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee0000000000e136df8005401f00000000000022002019cccc41d4120d54831ad41b091b1e52b8902711365f1cbd9a44a7b5a3dc22b450c3000000000000220020653fa8ccacaea967b6bbfe9411c3f812cb44c4a18d4f6806fd81512009f706e750c3000000000000220020c9c8b5e68eea1a6f32394124873d68c66b1cab8ffe657c852696e1a1597783d924390200000000001600141fa232bbb376f103dd015631dc8d6f4f9d306122241c0b00000000002200207121fb3dfd089e1a7b7cf0934e4cc42e99678c7db90927a358985a6471d0cffc040046304302204b7524262f7aa8fbf4e9fadf476ba42b4202617b16e4d1e1ac7c9db1adb8a126021f59622119b96d12a66c6f18f12b5c04764c576f9ccb4216049ddd6e719cef9201473044022003f76c8bbfc91e5323ddc1d7a95e8a3c7707de898e6a50fd5e6562b8412e32fb022010b2bb7edcf519a9451b3883832a39a0f9008903b52fb2db90e6e371bf20307b014752210252a01d9d8b03db1a99b1a82223f7dd60ecffa69dbef47c06228fdea2fe0f0215210322a747c1d7f77fc7577a689618bbeadf28b941412404ac5e216d684a32d57a8e52aec34a86200003000324489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac000000002b401f00000000000022002019cccc41d4120d54831ad41b091b1e52b8902711365f1cbd9a44a7b5a3dc22b48576a91423ca5b93a48d00f645081be0479fa799c70731a28763ac672102897afb6799af1c1af49fe4c96800ee1cea77553c0b5ae9b8cca5347238cf5be77c820120876475527c21035a26304d46e27993c218a0c644a613ca87630c8f0e1db5f112a01c3af26cdb8f52ae67a914d3260c3a0710948e34d708a99ff708f9c257ac5288ac68685e0200000001489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac000000000000000000015a050000000000002200207121fb3dfd089e1a7b7cf0934e4cc42e99678c7db90927a358985a6471d0cffc101b060040ac4bb46e1b736a6fc76a4d86b24df1e9f9f91013025209ba64daf333863a2bde59a51a7af931bf0b07d6154daa30ed3a9c8c33d173c75765b46674a4e249bb734061aa4d418884ef272ea2bd65d745c42b5bd5f6781b7f876402b10eb505c60d086ddf3e108528e65f4712503114c24a20c8fab7867761677401defa780c4574f5000324489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac010000002b50c3000000000000220020653fa8ccacaea967b6bbfe9411c3f812cb44c4a18d4f6806fd81512009f706e78576a91423ca5b93a48d00f645081be0479fa799c70731a28763ac672102897afb6799af1c1af49fe4c96800ee1cea77553c0b5ae9b8cca5347238cf5be77c820120876475527c21035a26304d46e27993c218a0c644a613ca87630c8f0e1db5f112a01c3af26cdb8f52ae67a914caf9c0d315f1ca821720d6911e090095585cee2788ac68685e0200000001489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac010000000000000000016aa90000000000002200207121fb3dfd089e1a7b7cf0934e4cc42e99678c7db90927a358985a6471d0cffc101b060040dc5ef2218b256e0db9981ab591cf830819b62ae2068b6c4d19a85ba03153ff39316c14c1570a8fdbc2765b38a16c74e76ec7190f47aa3754e08c770d8c7e918640678fd252d77d34b3ecefff1fa369e92dad0b4a2632efe13974e538e13e14780c4c6c21838a7ead4878c9836405e45333651de6cbc012af4d6c1bda4a0039d5aa000224489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac020000002b50c3000000000000220020c9c8b5e68eea1a6f32394124873d68c66b1cab8ffe657c852696e1a1597783d98b76a91423ca5b93a48d00f645081be0479fa799c70731a28763ac672102897afb6799af1c1af49fe4c96800ee1cea77553c0b5ae9b8cca5347238cf5be77c8201208763a9149bd34d5a8ea2d91b8ac4d1fb4ce79bcfd481c1f088527c21035a26304d46e27993c218a0c644a613ca87630c8f0e1db5f112a01c3af26cdb8f52ae677503101b06b175ac68685e0200000001489133c313ebc91202d43a19b2034b1b2df6ccc257712bb0c38cd1d3141e42ac02000000000000000001daa70000000000002200207121fb3dfd089e1a7b7cf0934e4cc42e99678c7db90927a358985a6471d0cffc00000000ab009f4d0b317a141e5b3f865599676f895834400b66dd09d33ad27163ca176f401e7b146982a595ed1a95e1225312dce24f45237477efca22c759c9cb16c4a6bc1c9e8834a18eb0c6c389a14ea03fb7062f788003c5c58e738d78e28e004014a64013f1f51471ecdb32897a5f604a254334f7f5fa26de5fc63b96c942db2196ae9e43b34f00054e0c58a061d5ae5f4938b5d449b8f9371edd76efdfcce758a102c500000000000000010004fffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee00000000000000000000000002faf08011b29e60a38883a8d4434f17ca3d92161109f7ddd8799e64e86d6b8509babd1100061b100003b8c1771721551fa88af8fdde92909add6e5b8fa90a4b0484ee065ed3ed7c56e733a7fcd775d4ab92956c1328ffee9c195004c5dee5dd5b9d0f9034589e6769e72579d3d5837ad70785ec420b4a24c04d36668728c0d2534ff1feea9aac2410423fd79c7db9231ee7efd3d585646e378fe53d731d18f38d6356a970f5c3026edc849d49ff34e58dfb7548512461110088ac3aa800e10785029ba3b0e9ab7bde0f056939e4921792dba2f5c005135daf57e32cae06a9ccb1b4d321f3ba015e5b92def1ff1c200e56b3990d82570586bfae26e9398e17dc6c069f92d80e6dfedf6b2f24b1dc3cc9d63e684d861f40fdbf508d4ac34b7f10c57be2a9b0c5921f86869c29ada5394b8780d2488a4fca3cd98ddb0ff8ea4415a07caea436682835744e94d5cff6d3024a9525dbd697e499b7ef23062b18b225bfaa4c5bb07166f34ff7866ec8f0fbbc12f695c609692798364fa20bf7977e321deda3fe5510833494532fba94fc1f0dd14ec74f3e9fe8ee659634621b63d16d46a8958132c24bd82c516bdf9ae9515cebae42778e4de6be7047c31cf86c0df0306f7b6562e1f35be51e5e64cc6d9d4c010849e6ac7ddacaa4b7b6fb1d35aac815964090940e73a1193eece11c1c1d37e373ef58c5e2d690b6ed6338360af9906146da9db8329bd2786bbf92df10445ee093f0b1b2a640cc2daf003fa7141435ba1dd54f9cdbf5417fa7f539b255452852a85d2ce97ce5abed4980e7b409e283f97ccc9c01e104b55155f96ace6789f61c4661962d34fc5d7e6f5f5233180933b2fa7f7a5b074714645489f5221966160946b7bfbf0fe6733e6beb8af4457b9d36cde1200811009ec483a9d730ca980aa28f636942af5e89794a8edbc1b75d555ba134974374d0fe23d31c26566064eb9998d649bb2bf066bf710da50672f4e3ab4df843a0c8942bad0a071c237d4c1759eca37380919e36aec73284db202a32d3d1619f3e5b757b2df8b04bde567783dc8e465d996799782f1a1b8de9331681a35aa04edb427de87264c8ae9c397f29d3e8730db91256425a10b960a9de1a48d0d4186d617d2b69c87e2540f6570faff4ee1f6303d7d281434947abeaad83c86a4d25bef4de2bb3c6104aa0ceed7c8df039f4be6a42851a118adb1b8f98e02f6727b75d98541bab2ff24fb2f20342e86150c678941825409b62a844f44ca1ccdf0d9f7c2cf9b222fbed00bc92be0802fbfbbeefa71c8976cba8fc4aeb031480f434027b1cd593d08cbc14c2a360b736b06b5afb8da35f0be3818fff4275b8c830f5248a8b8edea1327454e1360bd90d4fa08e965f459b0b027e1180290cf762f813a31e8109f472d9657b03af737d1f7bd2e59441541a84ba818f1413c5cd1f8b9882e9188e0def9e44e2f4a7c710c893c7188ba86423f8ae86068d84e1832af548289e87c34d68b186df7e24ca5b051f8f5e4a44e2e7383ba2a09615b4147b34e86486731290ea67f3be24c13a9c5cc37f06555989b3f10c580a9cd2b416d0ee4210855c6833a25996761dfabb036f3893cff7db7e310baa8faa79f46e0ee43bf4dfd732eae7f44bad2e7c032b9c6d14947af6b0e37e5ec98372a622f716ffba0cde04b9d4508392dd154ddc34829412bfa604d4f00e4b10a553587343ef5c0944165e7ee1e34387b09c147ecba943cf36dbc4269efe50ec3a5a3075c43be9651d6db6acb9f657476952b78c990557f05935247a71077373ec436ec586def177448f8859ba096b7a838e5b4ce7a463f9082f705c26d99936eb1be584ea9b58a44b9b4faa07fd8247fa66cf4529d1b8cdb92ed7bd96bf0968db4376489c7d46f0f27d58ac884c29736502953723ef1ab41e19c7041d3e0e9091d7de2e3904d032de02292edb1225a672ab438d3c65f7921c06a9f181f8ffda4ac524d0e0fffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000100000000007a1200ffb841fb291ecf09ae7b5dcec1feeb45ba196ca02d6b9e50ae2b3dcd9ca5d72500061b100003acd0a3acb9b4f9540678dc9324480bb3d4f54e5e007739c9c1d600bff75dfbbd0191e75c0a2d810a6ec5b03d02cffbf1a66123c87790e66eee8d416caf82e7ea7090a62fe14276fa88af32ab9793f7a100de5525eedf71967c13c8d361246d98b78cc74383e714f88899f34407644c14874046b3b722186015c07b8db042db955c91cb14abbf3cfa646aea81ad15bf67108a763539c64c5a8e8115d46e063e956671e8ea8d8fd638a6414d71e9b475ebe070da7faf75a898f29048ab5a2b6c7e3a72a178b8e470e8375f539ebf6284d15486c5a8774d46ea164ba2b62181f47623fd987ff5958550c962a193638679b79fcd477fdf2a09c0fa879bb22cb493fbaed27518f5cb265741535b4ab14246077ca18f11ece7aaa0e01ec5bf02c3c3b541ea08bf254df123079c1538e266dcd3161bf1b9ed41d873f1491906e1459ba51ac9dd95e783598d3c356e0cc5b98c2a96b148f55f102a9810181eedd46cd00b445d861baeeac46eba469435aa4ddc877bd68b53f4d005aa2566d356cc344aafcdc86abd774ea28cc838d2fdc541c4b6da494a96e128b8c2abab4b21b3ae2646cdcc3528ef6fd8587b3a0636ead67a62309fb003afdc14177d329b062622313e9dee912847763c68678df663a39b89c69efdb6d916d5754534bdca9030955cbcbae6fb7ff1df6282175cd37a30a904418b976af05809f0e0e7e4b4e2ec018f1e9c6bcbe7a7822c8699669946f5e684671d63e68cc7c9cca2963945dc21c52232e6f83b1875b2bed7c80c37371a480a2e5255d49d390c3b2adfc695036ed91371cda7d79bdfbae464581f0b32942f03826aca17ab9da6ade4a778d310ec3da17fc3af426d21b347aee7c2db7b5e188e35714dc514e3a1c100e8595c9e0e4399ad796021976f077e5733ea535cc6daec2e371853dcb715fc366ea7d6b9a5b3509dccf5c2e1225e3a51de9f5bb9b6586b282a0b27a9ae7ae8f2be14ec677670241e384b462eecfde68957839b1327c9e5c622c0f67cdaf3845ddbe6f754401d720d6b6d5c061dc906bfa70fb76e1168c6ac1a25cabe8873c3c1e540ae44ae631a2638accd7951f368442dba7b38d0662ccb0140d1e4ca23f51de731a6f5adcf816c3235359afd607e58948da29a5f06c96b4312aee7d35ed4c2c811a58c5a196ac2f377d653d51cfccb5213c928955ac880b5fb1b91e88a52d5c217cbf78e071275fe626c230fded548b0f1667af1309149ff74c5542119d4e269fdc1b241d9f53e02e38e015b7c5c2d2ee623bcb4167e37edafddc7fadd642c20f81b454db1a3b578d527f124dbd1f3d99fdd1590256ae4e47c2e8b3bfe8708a0d5506d6ce8b130ce6b70028161454a5065e9925d75c0095dc24ba789489fa1e9236e25330ca1a45e61224ee027664f6589028a240961aff09187fb719ff3477b56427189b7b3c790b4031f6539c5e3a8a5d7fd99c2534ed1646920a43e7315bba98d59c51b337ba7a1b038006bb574df46830f96a5685e07ee8a0a41e712810faacfb231c67e69d0fc24b98d782c70e15524d5d2dcf4e64b4e26772dfa7067f6dc7ffc8b06e6ef3ecb13f927d466e0cd3a7ea09aaed90b7810bbfdcd8a1274bbe78a453ffff11ccee62059ec25955b34a1a1cdf8a3e506d99dcbadf16032646117556ad71cd93ceeec42be0350a6c9f194fea783558c42a56d034dcaf6fb1b28037362c7c6e2446bcda71d0a88adda3144589447ef13cb85a4d2cd16ef444097bc03e32c3b1a055e952f7ac87078b04deb900375a16dbd382ea4375ddc0a9645deca620590337e803ea8b41337f3f4e4030119a2337424dbea3d21214063ce853843dd4e6df94e3dc3bbb36d89d9eb8e15e52d0699bc6ad1de9d12afc95c8785d63756576d357126e13b25502d542774f6e5d2fdb559d52698d086fffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000200000000000f4240657c0bd97e795218aa623b27cf9a71764379c4762fcee8993aa0b1ab1e32194a00061b100002c0ec5d388a8c78491bbd870faa2c46e4282e11796123b69c2792e5806748ef068397f0212a33e3f79162ba4ea247ccec410db039dd323af48ac27bd0ba77ecb870c587477d4543d9a29c53fc02bc98d7cd0144c7abf80b999c22b42a28ae8d625478ca304001f9a49782ec970031e673c76e4e27357a321729d6df38d1d88dcbf764c69eda3baac9739bed637010f44638cfe1deecc56b76f6e02d1d0c3f104462b9ffa5f20de4cf092d86a5bb35d5f62b0fb1c983a2c06df17c9ffc809c83e4b4335f5903fab536fbd9719847bb063541ecbe05c12ef8d058b3547faca054e3d662250f1cc1f925dd71297abc25fe37ab33a086759fac76208a64552f84d2e4d84daccdc3aa2bbd2c2f922bf262596742dfe034529d1ead2975dd3d197ab0e2e1c75c8b8f160ca6077638022d4afbd107979949cf342cb399347f3990029f0db6d9ac0c569d61d42539371f9a7ff59e9c83ff97d15bf0eeb254ae58fb7b1f9d8710c546ac8a227930c66ac841bc4f475229e5cadd14ba5a01e6b2da99c55861a08e2100e62c4499d30003fe30ddaa347d7a27c2158d3787d58fe51ae57d797bbef7f900508d1580df3e5233f0887567fba1faa918c246d2ec5c3b7aa022cb8a652d00b4d719e312482f57655eee80a90cdc73151fd7ab9c5367793d60c6088fab98f0547d7f547e10db202a25e027a5cd0abc41bb0e3ef563c0a6d469a702b2a26f0e8b4fddb845a16a5f06b9dee33c3adb31430c94942c5023179d3e4441948a332069a1c3b69dca65f05a43452e42fd28a2f7e6344f98ab9a7e4eece3c1709be1f7bb620f8b6c45989a8bccad39a4bf40e8215183d1449196f1f9fc17de778b616856152e6e6145a1b7a3d7f226becaea5ebe34aa4bd06e60f0fed207bfd21f5663bfadd37dd722437bcd46a26fb4e19d062574a81bcd817eecbc1914a5878809128961acdd73113ae9c51070ff4494e16d81ccec777eeb513da82bf43d4884812b26546b4370dc315793271b069f60f4285f648cf122ed8b22b0c7a27e94ccd59a273eb774c109e19980e146850de95f82cdd8aa0e82022672024c917b281422d284df0ee0bdeb3d4ac56b4ca675ebdb835c17b6a822d79ae7310f4aa41d80ac61c5e45c1c0e1d64542622a31091a9f87c335e86d964dd85a951d7c9bf41c9f2b1a9bb8424d7d1b26413da8034182fa42d2b1cd1f8745482c49d8348d19c72cf5a02bd28e4cba82128af8bf5d9c1215c4f543ef4d185f100f8d803dfa29c300c072e44ad9542b82fb1380d55c15c9a4b4398876e2450b90b49990746f339abca8cc8a462b62329a128758ce0e46b5f998af1bb485a3044bd125424eb5c623afd2a11befe4ec544eafe275ed1ad82b940dad5e9a9710d48562e51b296ba81f2d70593685ba0e3f3b25089a187e61d5675dd481aa99620276cb0a841a3c4df201a929287b1127270c5d25d06fb286dae1a9a5a5cdb60003f0c30d2021074bf252e550685f7b51a087a77b0871e883104e55f898aa5bc4cf8538c293253a737556d7f220e15b90cf0eda7d5f2172372e3c50c12cc588f312da37191b5038e944825044b130bff281ecd47a4252a1411ab7a9305c2b37e9facd435e9c434de37641498f8e4bfa7b42966da29c84200aca87ea1c3b00db54906b340e524a7dc4a15403bb82bc24517cb91026096bdf18f5f7ae5640ed6de1f0c5d184813d6b9d244b32b58e9ff524741a39383eec3a530d60db13deb26e3523a725f0599b671b625c07002704fb600b77318417d2527537359d122e22a1f7581eaebdc19e65ba50bdda18ae08e9a8694fcb0ff1a2cd98d910dbcd52064c15a4282d67b278c72a0fdbf228abf6b519dd28ac21c57d1da4bb7ad5b5ab10da6b83132df1da79ccfc77fb45598bbd91ef5ab96d8a2ee148639a562debafffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee0000000000000003000000000007a120bf5899359b258acdec0ea500e437267aa6ba18e8509e15df74518f6ba7aa348f00061b1000036d768d1d63f1c9f09c252b5b48cf4d2db3f4935150c551391b37727723168982d7e58ce2a769313e461a0f3791a8c0208a769f5bdf4d57fbd0a9de104a0b1bbc1ab25ebbf87d1bc86dbbd42fd0dc0ff18a7ebfdd692c7dc3b95d095052540ce7801f3e25cbbcfd9dab857bc39624f59facbfacef5ab1e1e1f889b85f3b1f2a580cd660b73aa662fb15487722bd3c3f93d272725289136f2ee0fae4efe1afea25e6d4fc8334a47ad62d22be06605a15538dbd2a81311c4489b91d1cb143743e4570a6345c4f035c060aaf287ef66e7ebbe7b9037c10b66e087827478fdf76a02d25fe90e0f8228c1edfcb12eee3dd4e505a6c5a7bf2f5954ebb5560cd8c7f8b8f3f4ddca41a48a0d6c0e1092dcadc853752f459486bed349213cc15044585255842717ab70a3de3f0eedeecca10112c85a8bc248dc66c883a62288b49588d9fcc048c51081e94d65bd4731e7d71fba13693b82d2831d3bea370918aa5ddf1cc4f0d5015bb8dfb951ab13fbb9d26d5cb83dc980fc36f1712d616ce24d2c530253320f4f322f093a605ea426c577544f2983efc80be56791f443652c2233039a68f966c2f0b6351068616755dd2036b6226244d394a2b5b59160217603149901e8abe19a2bf404f384c2ed7fb0c5e470ee5ee8561f58f66bda729c2c8816853ad2357a009e537efcb4a28e845ca616be917b15aa6b8eb280bfcb321ea62fff21168b8ed54d58ccfdeee0e7752bfc0f02549d76615c85dd1e152a85ee931b34f436439e2233740328ba504c49f9764e1dca645ebf6a1377310ab53b68b4d0a6e6c952068249b86c29061725035db8d294ab9c56901485814735aa2a8d6987b1a19ced65a332f97751c4cd8a27093851f7775e5314078c04d254754d976bed2dbd2e6ecda62e9a0c7fd95299b4b13a54c9498d384210fb42d3b6bc5d8f0d42e42879f86c21eb7c5c6d1bffdd598b8f3cfcb75df159f1125a65f960637c62c7c5632d73b7b4b0544082008ede22d87e79e20eb08be0817650fefcd111de48ba2be02a7b080275c991a0ee4445dab89312644c7cf4101895e2dbcaad7d87e8e3b13e62751861b204a7e6f5a476eab0817c294d59aa0247903077d4cbe4a98e7984d2b04623d2b2ef4c650b43db15541ede229c12c045529b5c77993eb6acbdc28d812a486b5957fb996731980555bdd59ad824a882ebe1a77cbe6b9035f1c69dd01b2a27a47be5febfa65c721354e70071b07db4ebc2f01d143587c1b32a5337dd010d2a76a7773f4a7c665b4cfe4a61b103b1c319d85e007eb99b52400cd8776697e1d6118197655bf7bd0a5e7f4594bf36a2706128d5f5c3ee166b586c4d515611f4597a4c1088c1853a5959f73830cb973ea922d6211ee7d9b1d67b1025486f8f3c72a517d0d48d9a57d64c0f48e513c3b09e14ce91b515a87f3035ab55d241ccb12108dd299a362af26af96ada920202dfe26d456065717a85e6bbec540637059d82480f6c917a11434a9be5fee5ba33a8552b7b0e59f123991525e1dc14bfdfd109625b2df477bce565045375dacf6ffe99081914fc9f64df7ef8eb26801ce01be083555fd2f8a338a33c07f484b01a310ee420f5c932cfc5a8f6d32a20c3915a188833ac5775500c5d2b73e4ea595512e869f91f83de8e048c804ec8cd6de45b7ad264bcfb3c235325d3c09673a2a94e60736ceada065cefb1e355bd35bd4b56ae513343e85a3d840c2211da2d1941112318f97f825e1714f74fc2d33430196cca2423f43641b0d75b4b1a1a1ef0f07af31fda06220a2628aaab9f303cb4fe6d73fa9b39e8f6083af3bbca1becdd646afbd888c560bbf7cf4fcf5c02f712726eb23b03fe5c290df63a85ed1026cee07ab0d2bb868aa4dd6594252cb75ad5d11d9c53c5238047ea3d311c1443d478dd283a260270400002710000000000bebc200000000002c232220b8e78d93ef82c5351ede6c6aceaaafb806ef6ff23deb81fd78e7a9bebfcdeb5302f6bed70479b4d98f5c93f32b382524233983ebebd14b2b50fe35142766300efe000000000000000000000003fd05ac00805d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000000000000000493e0f81fd474bea478df0202b311c69e85dc6215f629491dd15ad0929faae2535abb00061b10000370b2714d2734e6b8cde085794dd7b41c8a9b6c03c1edd8e3db168ee7fce39493596e882b18b5b1b79c16400c6762b9856075821be6be9fab8f469f56820d8f341554400a8da7f1f1a8501902581d43b9fa6e5c68015716f718a2190b87fce41bf1b509aa61806394a42489d63c457fe4c79e7480eced1315edd731887e57704fc9102f50cb7f0d242d755cfd5a2172dbaf7f01b124861cc6d1dc804796bbb84165c805f0c0f3fb9ec97b74c2a694de56a9cf8d79d1a679260ee1169d78214b34c8a654ba22e59ddcd32beff4713de33549f035b342660405b0159a7a508e5691ef4805689140e72b8a0ef2e61be74dea5d0b8f5589e0e373cac2e2e1cc39b2121c05cf4122ad0f8b9af6fbf1de2ea26376c2650ccd306c13a7b64acbf2a3feed128754abe44658009e642768ae3d84f5e0fa5f7f360c2a1c76d26985817ae77b71fb59014a5483ebba9271cafa5e5d8031c569adeceb8bae6444e98d2522b28f6682109fc7d31cdb83ebd45e5d81e7f046df42345b49f470dbef9ed87709301d2c6131215d33a30b8d18e63e54a2aff85dd57672f8198bca6a67ee147c7d0ae649e5661ab6bf78a662fef9a164f1e332b9f16e6fb3d5769ddcbc1d1c07338d3394b9245d17618c2474e86c064fca4df00ad3a93dc051fd8c3328cde2a987798b0f22a21c90426700abeb1e6f38dffb485b5477ec44c690fa80e317b32a982fd3082253bba8595783290dbffee4fc9296ffdf16a8bf3154971bb720e78674969e9db2e0fbab9e9e13f24bc8b3af5e2f00f262f0da56de443f70398ab68f747d35370fcd8e1c0e130f7269e08f862b5a67f2c129be254df2358762ce3a947eb27d66450af51540e7721b47c8a5a86098ea64dad381f14e07aabbbc470949a99c07612add3ab4c575fe2e520bbe511a1a674aea37a44535c13ee3380f8f39bd230fc1481cd31912af36c6751e23c6f383cd37a8b13fa7df9f0c7e460739f2c6226638ee14f14d36366211cbc6a1e16b4856bf302a540aa9d9e833b1d59c510473096384c8b450f2f3f1dab9e614af822949d5cc93d76bc4d1a52891bc85f1981ef83161195ab7d8181ee4fb163bc6c685a10e87c7f4b15ed7d05833c230a4a5b63841fc65b959f0ff010e697f47c583f9b7fa9b389c0eff6614e47d85b83c483136f182be4c151d272f5d938b912a95e47d333e5de6a409ad271679a778a7eb3f169c71525302fac5d4575e2645c09763c2ef165736a7a726ca605038e2781404328790ffaacef2b9c2bf90122042cd571287bc4e3973da65fbd4e3da9e40e4347ca6eb4ef1ffef4e5a34be80425cae3e81533f7f2953f95fca53a22057a39125f5c76350fba7fc6c036838fb951d0aa8702e7f44c6f8a9cbce3b64fa8ddc2bb8c8b35d1e29a21beda6fdd332b31a749321455277231fd9d70ea4aded95053b395f88fa6916d126e1626fc0f1be6cd2a9538d17c498b40927f12b3bb40fa3e272e82cd2242b670afefa387470f4e6e0a1236028954c9e90311f486617187956a23b90b356d71e219e6dd055c2120771003a6c12769aa3ceacb9642bc01022731ca7a413b68ee7d1d5444f75dfa51a68b74a01ac85f6ceaf5e56987b9d67d6de896f5aafd25c78c413a6d4b5b03d571167524cd231ba13bd9f80fd7413faf21e8170cef0d08b242c5c38a2b0158da56e358ba0692f670d4611c7a3624b234adc30c5b7198e0afc941f5d13eae3a94ddffa652c784c34c582e04e948da91a5ac3038a9df38fd4f1733779f4f122ca2d7ff9d03bac9def35d9ee3a183161f8f2808d472b2e64581209359cea58ca7757164c666029982223877e2b14d2d537afb012f1ffc12cd083c16dfc64213c56f3d4d22b603d3dfab1d21e239d6fc1f9f153ed61f1ac91c29c85c16f4aa2985f84052f5a08d32bddfd05ac00805d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee00000000000000010000000002faf080ab009f4d0b317a141e5b3f865599676f895834400b66dd09d33ad27163ca176f00061b1000028fe56ab181f454372c939ca0516f5782b26cec2010885c70e55c41a1e43de3af6635d2ed0bed90837cefa9f1805f4808e8092a4d44efe5fb616ff7678487a460b367134fcc728ba273fb1d22718bc6a95e47a120a6d952c7c2cb8f38e59c2a4efa63977cced7e4b8f46e4d47d29098a73beee807c3337c4acddcbb32b78eddbd124b2f33ec6cd8bdd364aa4ad2c10eb69dab808fe5f5f0aec19750e51ac65a8746f345c05d4b8823ffbeadd6200ad01449c39a008fbe117a8ee904445488811336d0c439419fa4f285f9f62a34f10b076c99c0092968e3cc9fa656016b6da049bd56b910d7a9356e76d24e746b280f0275ec9e9bace82d852bf0a137ea02d4cbd3b68450bfb593564d8c20953bb758890a55a8c381a4b3303b61ec26a56111361bf7262b3f6f2503aad06758130d86ea607cdbba53415aaf253430d92fdd81c685ab39233e94654e6508eec1347747e2df2862169382aef6f99dd78b50629c5d98b1fcc73e865679d862b42f8e9d54ef6288ed2c3f2713f0fa4db538cd3e70ec1a30cd65dbf873f581b30892acedacd39b5f0aa774d1f3f77d8fd11ed628bcd02ac33f89123595aa455ec54a07e93e26f94338fedd8bb84094a0add52f912ed5f9019e3a28d90d251cc6ed7ffd35254dcadd9f1e9b28eb0e06fd4fe961d60cb690a7757f475c08aef07c2e54668121540a42a9c779623709a2124629e8c4bd4021763979647f625b360a4559dfd3f57798dfe5d36e9d902904af3ed67d8f4b0894538c7718f5160d211cec27375a7e6a2ec42f2c8fcd1c953b7b8379d42439a2c6b921a66d5102ceb6bd6bc20b17098e69a0a4f708b42520e4792474c3d115a12c83ef60ac6e69d8842c5981e9a6d178efa352e73e4a34bed4fb590dbeecb259617668e6ffb9f955297f26e3a6a3b95d9617529a61f08666ca1069d2ee1876337d3e786244c5bb45a8236577184584cf3018118d7e4e78973ee510b6773bd922797e580cd240dea3ca31892d23c1e6e4fa92f1a01da8ea40044f5613a9429ebe7906f79b32636204d025115810b376d4c6436da136b96c7c10649e3290caecd6ca14d995a817e3725fee7e621c5366f80c752e50aeffee1af3361924f31cbb1cb44731d19963ff30127ca2363ce15e50948be14c43400737ee8910ed06027599da74b06e77eb82ac523cc031c57c02dd82dbc0d53629d072615c92034cf829e7a5d4437b1f58e2bd4b16993e1e1b05c26ed8d695351db11d21df36a7f5811ef5fe001ab1e1c6ce9d2b69b6ac3af8087e6666317f75b645e3b1caefac0eb65327fcb9fa62be341c99f191cc869e48dbc8fee3e42d4393cbc6505c880dd6739a69be4f7ef3de306480a7a51f413d310926f252ea96a0c772d8b8e94e7d6cedbfbdb21fae2ffc379eb17c2680fa2bc56a8726c93e7bf2d446221ce95e49da93d29bec8e53ddcfd262c33d556c2b8921c3de93236408b462d28612d3343fbb9cc538b1e6b33c341c3b91dd41f936931e61f146fd00aee1c5c0de97b47cf7efce889012e1c22dd8faf0fe155f4e9930c27941d8b0907502a835bfffff801f6835de69ad33e95232f773219eec0e2374c421230f323257dbc91629c4ca8a61584f737b827fe8e8f5b69b88a7b64b362f8142b043f08ea82c4a0ab7c4e0b9805533e806f90597095242ff64f314801fb7ad838e98e1859b2c05c9b027ae5a4baf780d15977bc1492dee9b14b1cb0fb3243eb2304919486fcde89a3cf35a64e31b1698e35fbb8528a73526a19189d406272b8becec94379f69372afa99d06bb4f34df72e1c3b49557855ae8ac265160bdf48ab34cde30d2665891cfeda24adcc657d851431f38953f917f1a111f023d2c71845ccf25a562d2450bf8b4986b64ae4fd09e5a8ab9610d11fd68e9d570b3a467780236de974c7fd05ac00805d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000200000000003d0900559bb949364ed92a64f449cd6ee3eaba2e607595d3cecb36b06b145baaa69bc000061b100002860fd058656f185036e81a64fe19034d29223d3620bdf4bf2ff3c1def9c6bdd70c2cda7f660e1b202672741bc3258b04fb755fbbb1350261e7992bce930e256bd5d8d4fde61365b7b24904b788ef2040fdd6eb87f97c2d2f29eab4291d9a28b5da306f28b98d01d93517b203a028199d423a3545aa17522c63247f73af7b63335b0b48e4b875c69b42f4cb1573bb3e5fd68837f90c50b0161f067a9eafd9a0790e53ed5053ce60ffff410e4b16a4b7bc5a52c57e78ef266100c9f79753f81878c08e5dbd4d80c6e46a339578d8ac8c572df77ef614800cedc460c06878c0da97908067729ed35e3afe919071724f89ab736f5791a9c9b5d422136332213434c836e2ceb9fce0e2e96a9a6d7befe8c132867d5fafea1a7809ddd6b3a89c8ef6ea83028d3e2cca00f1bc6e12ea8b67e91a98acaa2edebaf6dd3a18c655b6b1fbbff5c641f8002780758d05f1f39c9470a124a5add314abd2262142733120747cda2f1d9eb90d68ecb9c7fbab23d73a35f2a20a2a365de6cd678d53bd5bd9bd518333d04e8e678b5d08f028982dad08c80be7d8fbb0638dd814232224c687f8321baf96ed8b39a1e9ab52dfd69d8eed79ac3f5a2c480a585bff038c92b367743317b937d969cdd533ae1d797a789ff7994f86a0d6cae470b64ebddbc478573af347a110dd1feaaeb4779441ec439cfdbafaba870105efd86b9d85a4df7ddb9b09f5b6b4144cd1fad5932df37ebf19a62648659fc1969142310a5cc9b4d0c48ba6bb0f863ed53a0b75fe1ee6515a46993f95be2e34166408b54a43e55c4802b37ac902fb4c8367ce38990d07ed3104d0728d327d3b9de6452b520f9af534505885788109ec78c1176ca0864d28422e826cc83f821b7eaf028d6a7e350b3037d0fe58d1d4e18113c8f61913932e71c0f334402534d8663f15445f900fb9dc6b3a93223868167be26fcbd70c0459eee37f81fd539c319eb0b04bd478b94b5f4cd23b4d496c2bdd6e8a154fd76c4ecbdf7647fe9e7be88c6a3a8e7696e2e596dfc25ba798db6ca331d135e9ce7c0aab9721d3f70ca53354f96ecd028236259b9b0d9e0bbf73c8e841b1d4276214f7be8feb525c91d39910b0e091997a2b89e945806e93cd325cb51463b0729f1a519334038cba09653799ef533a49e812e86b81af7e5099a02ca11c2b17dfc8b9e51a57a20546f2c92826676ebcb4f64fe7cc77424388dfec7199179cb125bb4613c8bf05edc4173987d7d5ae0fcbfa08a1e5ea2d6b01406d740b49c5b1a68da585549590c3ec13479efa3136c5ade68057fe173ace55593ceca8440372b03f332969866d1bfbce3fe9dd907d27593b8b2ad25eb4b12afd0f3abe7931ba7789c84a3ed65a03df06d998a9956043a4de786c359bdd58f0b9e5cfc32bc709b626ce8e63f3997a0e9f784f6b94e342b4710553e805cc8399191254189058ec75a15556467b2456d9b38a7e4d15cf59727ad2c32f0daaef1748be04311ff484479eb31f7eff9e32b816fa40f40430e801c15e931294b39ec4d6c93e8130fb4a1b53ca6471886a33b10b46d6973d02bbe3b39345e121473ea4ba41f3cfced07c3a613393e38b8ca01c353ccab96128093bb5fd000978b11ae6f7c1fedf48c3682119d1b44629d02ea3800d2e247ef1e78e527e5d574b4dd144e1fe1b0c6551442d419baba300258657792947443747b29b6fb9417d3c57536de6aa379c02f3addbd2066554189ca817c7f57331c972c30e3ed06fc7e521b8e2bb57c023dff9816f260a153f1ffd55df2a2fae568f3dc734d62ab47a77c54772b5e4cf2758c912cb473ec372173d9eda0c58b103ab12d11dcb976a40816ecfa8b9c9384f6415017555933652e77ae20e14ea9ac25b5811fc03364c4883bb78c82e29f8a8892415ff652b782642bf6036b3e2200e0000000000000004000000000000000300040000000000000000000319c0569a7b4f4021827771a963002b8b00000000000000010003d56d81344fe44d1f8f1a95850431563c00000000000000020003d33fd4c8d4ad4ce3880bf79a4856ca2100000000000000030003efcb10168b144c8bb4f694a3b98a129f000000000000000002000700fd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000200000000003d0900559bb949364ed92a64f449cd6ee3eaba2e607595d3cecb36b06b145baaa69bc000061b100002860fd058656f185036e81a64fe19034d29223d3620bdf4bf2ff3c1def9c6bdd70c2cda7f660e1b202672741bc3258b04fb755fbbb1350261e7992bce930e256bd5d8d4fde61365b7b24904b788ef2040fdd6eb87f97c2d2f29eab4291d9a28b5da306f28b98d01d93517b203a028199d423a3545aa17522c63247f73af7b63335b0b48e4b875c69b42f4cb1573bb3e5fd68837f90c50b0161f067a9eafd9a0790e53ed5053ce60ffff410e4b16a4b7bc5a52c57e78ef266100c9f79753f81878c08e5dbd4d80c6e46a339578d8ac8c572df77ef614800cedc460c06878c0da97908067729ed35e3afe919071724f89ab736f5791a9c9b5d422136332213434c836e2ceb9fce0e2e96a9a6d7befe8c132867d5fafea1a7809ddd6b3a89c8ef6ea83028d3e2cca00f1bc6e12ea8b67e91a98acaa2edebaf6dd3a18c655b6b1fbbff5c641f8002780758d05f1f39c9470a124a5add314abd2262142733120747cda2f1d9eb90d68ecb9c7fbab23d73a35f2a20a2a365de6cd678d53bd5bd9bd518333d04e8e678b5d08f028982dad08c80be7d8fbb0638dd814232224c687f8321baf96ed8b39a1e9ab52dfd69d8eed79ac3f5a2c480a585bff038c92b367743317b937d969cdd533ae1d797a789ff7994f86a0d6cae470b64ebddbc478573af347a110dd1feaaeb4779441ec439cfdbafaba870105efd86b9d85a4df7ddb9b09f5b6b4144cd1fad5932df37ebf19a62648659fc1969142310a5cc9b4d0c48ba6bb0f863ed53a0b75fe1ee6515a46993f95be2e34166408b54a43e55c4802b37ac902fb4c8367ce38990d07ed3104d0728d327d3b9de6452b520f9af534505885788109ec78c1176ca0864d28422e826cc83f821b7eaf028d6a7e350b3037d0fe58d1d4e18113c8f61913932e71c0f334402534d8663f15445f900fb9dc6b3a93223868167be26fcbd70c0459eee37f81fd539c319eb0b04bd478b94b5f4cd23b4d496c2bdd6e8a154fd76c4ecbdf7647fe9e7be88c6a3a8e7696e2e596dfc25ba798db6ca331d135e9ce7c0aab9721d3f70ca53354f96ecd028236259b9b0d9e0bbf73c8e841b1d4276214f7be8feb525c91d39910b0e091997a2b89e945806e93cd325cb51463b0729f1a519334038cba09653799ef533a49e812e86b81af7e5099a02ca11c2b17dfc8b9e51a57a20546f2c92826676ebcb4f64fe7cc77424388dfec7199179cb125bb4613c8bf05edc4173987d7d5ae0fcbfa08a1e5ea2d6b01406d740b49c5b1a68da585549590c3ec13479efa3136c5ade68057fe173ace55593ceca8440372b03f332969866d1bfbce3fe9dd907d27593b8b2ad25eb4b12afd0f3abe7931ba7789c84a3ed65a03df06d998a9956043a4de786c359bdd58f0b9e5cfc32bc709b626ce8e63f3997a0e9f784f6b94e342b4710553e805cc8399191254189058ec75a15556467b2456d9b38a7e4d15cf59727ad2c32f0daaef1748be04311ff484479eb31f7eff9e32b816fa40f40430e801c15e931294b39ec4d6c93e8130fb4a1b53ca6471886a33b10b46d6973d02bbe3b39345e121473ea4ba41f3cfced07c3a613393e38b8ca01c353ccab96128093bb5fd000978b11ae6f7c1fedf48c3682119d1b44629d02ea3800d2e247ef1e78e527e5d574b4dd144e1fe1b0c6551442d419baba300258657792947443747b29b6fb9417d3c57536de6aa379c02f3addbd2066554189ca817c7f57331c972c30e3ed06fc7e521b8e2bb57c023dff9816f260a153f1ffd55df2a2fae568f3dc734d62ab47a77c54772b5e4cf2758c912cb473ec372173d9eda0c58b103ab12d11dcb976a40816ecfa8b9c9384f6415017555933652e77ae20e14ea9ac25b5811fc03364c4883bb78c82e29f8a8892415ff652b782642bf6036b3e2200efffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee0000000000000003000000000007a120bf5899359b258acdec0ea500e437267aa6ba18e8509e15df74518f6ba7aa348f00061b1000036d768d1d63f1c9f09c252b5b48cf4d2db3f4935150c551391b37727723168982d7e58ce2a769313e461a0f3791a8c0208a769f5bdf4d57fbd0a9de104a0b1bbc1ab25ebbf87d1bc86dbbd42fd0dc0ff18a7ebfdd692c7dc3b95d095052540ce7801f3e25cbbcfd9dab857bc39624f59facbfacef5ab1e1e1f889b85f3b1f2a580cd660b73aa662fb15487722bd3c3f93d272725289136f2ee0fae4efe1afea25e6d4fc8334a47ad62d22be06605a15538dbd2a81311c4489b91d1cb143743e4570a6345c4f035c060aaf287ef66e7ebbe7b9037c10b66e087827478fdf76a02d25fe90e0f8228c1edfcb12eee3dd4e505a6c5a7bf2f5954ebb5560cd8c7f8b8f3f4ddca41a48a0d6c0e1092dcadc853752f459486bed349213cc15044585255842717ab70a3de3f0eedeecca10112c85a8bc248dc66c883a62288b49588d9fcc048c51081e94d65bd4731e7d71fba13693b82d2831d3bea370918aa5ddf1cc4f0d5015bb8dfb951ab13fbb9d26d5cb83dc980fc36f1712d616ce24d2c530253320f4f322f093a605ea426c577544f2983efc80be56791f443652c2233039a68f966c2f0b6351068616755dd2036b6226244d394a2b5b59160217603149901e8abe19a2bf404f384c2ed7fb0c5e470ee5ee8561f58f66bda729c2c8816853ad2357a009e537efcb4a28e845ca616be917b15aa6b8eb280bfcb321ea62fff21168b8ed54d58ccfdeee0e7752bfc0f02549d76615c85dd1e152a85ee931b34f436439e2233740328ba504c49f9764e1dca645ebf6a1377310ab53b68b4d0a6e6c952068249b86c29061725035db8d294ab9c56901485814735aa2a8d6987b1a19ced65a332f97751c4cd8a27093851f7775e5314078c04d254754d976bed2dbd2e6ecda62e9a0c7fd95299b4b13a54c9498d384210fb42d3b6bc5d8f0d42e42879f86c21eb7c5c6d1bffdd598b8f3cfcb75df159f1125a65f960637c62c7c5632d73b7b4b0544082008ede22d87e79e20eb08be0817650fefcd111de48ba2be02a7b080275c991a0ee4445dab89312644c7cf4101895e2dbcaad7d87e8e3b13e62751861b204a7e6f5a476eab0817c294d59aa0247903077d4cbe4a98e7984d2b04623d2b2ef4c650b43db15541ede229c12c045529b5c77993eb6acbdc28d812a486b5957fb996731980555bdd59ad824a882ebe1a77cbe6b9035f1c69dd01b2a27a47be5febfa65c721354e70071b07db4ebc2f01d143587c1b32a5337dd010d2a76a7773f4a7c665b4cfe4a61b103b1c319d85e007eb99b52400cd8776697e1d6118197655bf7bd0a5e7f4594bf36a2706128d5f5c3ee166b586c4d515611f4597a4c1088c1853a5959f73830cb973ea922d6211ee7d9b1d67b1025486f8f3c72a517d0d48d9a57d64c0f48e513c3b09e14ce91b515a87f3035ab55d241ccb12108dd299a362af26af96ada920202dfe26d456065717a85e6bbec540637059d82480f6c917a11434a9be5fee5ba33a8552b7b0e59f123991525e1dc14bfdfd109625b2df477bce565045375dacf6ffe99081914fc9f64df7ef8eb26801ce01be083555fd2f8a338a33c07f484b01a310ee420f5c932cfc5a8f6d32a20c3915a188833ac5775500c5d2b73e4ea595512e869f91f83de8e048c804ec8cd6de45b7ad264bcfb3c235325d3c09673a2a94e60736ceada065cefb1e355bd35bd4b56ae513343e85a3d840c2211da2d1941112318f97f825e1714f74fc2d33430196cca2423f43641b0d75b4b1a1a1ef0f07af31fda06220a2628aaab9f303cb4fe6d73fa9b39e8f6083af3bbca1becdd646afbd888c560bbf7cf4fcf5c02f712726eb23b03fe5c290df63a85ed1026cee07ab0d2bb868aa4dd6594252cb75ad5d11d9c53c5238047ea3d311c1443d478dd283a2602704fffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000100000000007a1200ffb841fb291ecf09ae7b5dcec1feeb45ba196ca02d6b9e50ae2b3dcd9ca5d72500061b100003acd0a3acb9b4f9540678dc9324480bb3d4f54e5e007739c9c1d600bff75dfbbd0191e75c0a2d810a6ec5b03d02cffbf1a66123c87790e66eee8d416caf82e7ea7090a62fe14276fa88af32ab9793f7a100de5525eedf71967c13c8d361246d98b78cc74383e714f88899f34407644c14874046b3b722186015c07b8db042db955c91cb14abbf3cfa646aea81ad15bf67108a763539c64c5a8e8115d46e063e956671e8ea8d8fd638a6414d71e9b475ebe070da7faf75a898f29048ab5a2b6c7e3a72a178b8e470e8375f539ebf6284d15486c5a8774d46ea164ba2b62181f47623fd987ff5958550c962a193638679b79fcd477fdf2a09c0fa879bb22cb493fbaed27518f5cb265741535b4ab14246077ca18f11ece7aaa0e01ec5bf02c3c3b541ea08bf254df123079c1538e266dcd3161bf1b9ed41d873f1491906e1459ba51ac9dd95e783598d3c356e0cc5b98c2a96b148f55f102a9810181eedd46cd00b445d861baeeac46eba469435aa4ddc877bd68b53f4d005aa2566d356cc344aafcdc86abd774ea28cc838d2fdc541c4b6da494a96e128b8c2abab4b21b3ae2646cdcc3528ef6fd8587b3a0636ead67a62309fb003afdc14177d329b062622313e9dee912847763c68678df663a39b89c69efdb6d916d5754534bdca9030955cbcbae6fb7ff1df6282175cd37a30a904418b976af05809f0e0e7e4b4e2ec018f1e9c6bcbe7a7822c8699669946f5e684671d63e68cc7c9cca2963945dc21c52232e6f83b1875b2bed7c80c37371a480a2e5255d49d390c3b2adfc695036ed91371cda7d79bdfbae464581f0b32942f03826aca17ab9da6ade4a778d310ec3da17fc3af426d21b347aee7c2db7b5e188e35714dc514e3a1c100e8595c9e0e4399ad796021976f077e5733ea535cc6daec2e371853dcb715fc366ea7d6b9a5b3509dccf5c2e1225e3a51de9f5bb9b6586b282a0b27a9ae7ae8f2be14ec677670241e384b462eecfde68957839b1327c9e5c622c0f67cdaf3845ddbe6f754401d720d6b6d5c061dc906bfa70fb76e1168c6ac1a25cabe8873c3c1e540ae44ae631a2638accd7951f368442dba7b38d0662ccb0140d1e4ca23f51de731a6f5adcf816c3235359afd607e58948da29a5f06c96b4312aee7d35ed4c2c811a58c5a196ac2f377d653d51cfccb5213c928955ac880b5fb1b91e88a52d5c217cbf78e071275fe626c230fded548b0f1667af1309149ff74c5542119d4e269fdc1b241d9f53e02e38e015b7c5c2d2ee623bcb4167e37edafddc7fadd642c20f81b454db1a3b578d527f124dbd1f3d99fdd1590256ae4e47c2e8b3bfe8708a0d5506d6ce8b130ce6b70028161454a5065e9925d75c0095dc24ba789489fa1e9236e25330ca1a45e61224ee027664f6589028a240961aff09187fb719ff3477b56427189b7b3c790b4031f6539c5e3a8a5d7fd99c2534ed1646920a43e7315bba98d59c51b337ba7a1b038006bb574df46830f96a5685e07ee8a0a41e712810faacfb231c67e69d0fc24b98d782c70e15524d5d2dcf4e64b4e26772dfa7067f6dc7ffc8b06e6ef3ecb13f927d466e0cd3a7ea09aaed90b7810bbfdcd8a1274bbe78a453ffff11ccee62059ec25955b34a1a1cdf8a3e506d99dcbadf16032646117556ad71cd93ceeec42be0350a6c9f194fea783558c42a56d034dcaf6fb1b28037362c7c6e2446bcda71d0a88adda3144589447ef13cb85a4d2cd16ef444097bc03e32c3b1a055e952f7ac87078b04deb900375a16dbd382ea4375ddc0a9645deca620590337e803ea8b41337f3f4e4030119a2337424dbea3d21214063ce853843dd4e6df94e3dc3bbb36d89d9eb8e15e52d0699bc6ad1de9d12afc95c8785d63756576d357126e13b25502d542774f6e5d2fdb559d52698d08600fd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee00000000000000010000000002faf080ab009f4d0b317a141e5b3f865599676f895834400b66dd09d33ad27163ca176f00061b1000028fe56ab181f454372c939ca0516f5782b26cec2010885c70e55c41a1e43de3af6635d2ed0bed90837cefa9f1805f4808e8092a4d44efe5fb616ff7678487a460b367134fcc728ba273fb1d22718bc6a95e47a120a6d952c7c2cb8f38e59c2a4efa63977cced7e4b8f46e4d47d29098a73beee807c3337c4acddcbb32b78eddbd124b2f33ec6cd8bdd364aa4ad2c10eb69dab808fe5f5f0aec19750e51ac65a8746f345c05d4b8823ffbeadd6200ad01449c39a008fbe117a8ee904445488811336d0c439419fa4f285f9f62a34f10b076c99c0092968e3cc9fa656016b6da049bd56b910d7a9356e76d24e746b280f0275ec9e9bace82d852bf0a137ea02d4cbd3b68450bfb593564d8c20953bb758890a55a8c381a4b3303b61ec26a56111361bf7262b3f6f2503aad06758130d86ea607cdbba53415aaf253430d92fdd81c685ab39233e94654e6508eec1347747e2df2862169382aef6f99dd78b50629c5d98b1fcc73e865679d862b42f8e9d54ef6288ed2c3f2713f0fa4db538cd3e70ec1a30cd65dbf873f581b30892acedacd39b5f0aa774d1f3f77d8fd11ed628bcd02ac33f89123595aa455ec54a07e93e26f94338fedd8bb84094a0add52f912ed5f9019e3a28d90d251cc6ed7ffd35254dcadd9f1e9b28eb0e06fd4fe961d60cb690a7757f475c08aef07c2e54668121540a42a9c779623709a2124629e8c4bd4021763979647f625b360a4559dfd3f57798dfe5d36e9d902904af3ed67d8f4b0894538c7718f5160d211cec27375a7e6a2ec42f2c8fcd1c953b7b8379d42439a2c6b921a66d5102ceb6bd6bc20b17098e69a0a4f708b42520e4792474c3d115a12c83ef60ac6e69d8842c5981e9a6d178efa352e73e4a34bed4fb590dbeecb259617668e6ffb9f955297f26e3a6a3b95d9617529a61f08666ca1069d2ee1876337d3e786244c5bb45a8236577184584cf3018118d7e4e78973ee510b6773bd922797e580cd240dea3ca31892d23c1e6e4fa92f1a01da8ea40044f5613a9429ebe7906f79b32636204d025115810b376d4c6436da136b96c7c10649e3290caecd6ca14d995a817e3725fee7e621c5366f80c752e50aeffee1af3361924f31cbb1cb44731d19963ff30127ca2363ce15e50948be14c43400737ee8910ed06027599da74b06e77eb82ac523cc031c57c02dd82dbc0d53629d072615c92034cf829e7a5d4437b1f58e2bd4b16993e1e1b05c26ed8d695351db11d21df36a7f5811ef5fe001ab1e1c6ce9d2b69b6ac3af8087e6666317f75b645e3b1caefac0eb65327fcb9fa62be341c99f191cc869e48dbc8fee3e42d4393cbc6505c880dd6739a69be4f7ef3de306480a7a51f413d310926f252ea96a0c772d8b8e94e7d6cedbfbdb21fae2ffc379eb17c2680fa2bc56a8726c93e7bf2d446221ce95e49da93d29bec8e53ddcfd262c33d556c2b8921c3de93236408b462d28612d3343fbb9cc538b1e6b33c341c3b91dd41f936931e61f146fd00aee1c5c0de97b47cf7efce889012e1c22dd8faf0fe155f4e9930c27941d8b0907502a835bfffff801f6835de69ad33e95232f773219eec0e2374c421230f323257dbc91629c4ca8a61584f737b827fe8e8f5b69b88a7b64b362f8142b043f08ea82c4a0ab7c4e0b9805533e806f90597095242ff64f314801fb7ad838e98e1859b2c05c9b027ae5a4baf780d15977bc1492dee9b14b1cb0fb3243eb2304919486fcde89a3cf35a64e31b1698e35fbb8528a73526a19189d406272b8becec94379f69372afa99d06bb4f34df72e1c3b49557855ae8ac265160bdf48ab34cde30d2665891cfeda24adcc657d851431f38953f917f1a111f023d2c71845ccf25a562d2450bf8b4986b64ae4fd09e5a8ab9610d11fd68e9d570b3a467780236de974c7fffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000200000000000f4240657c0bd97e795218aa623b27cf9a71764379c4762fcee8993aa0b1ab1e32194a00061b100002c0ec5d388a8c78491bbd870faa2c46e4282e11796123b69c2792e5806748ef068397f0212a33e3f79162ba4ea247ccec410db039dd323af48ac27bd0ba77ecb870c587477d4543d9a29c53fc02bc98d7cd0144c7abf80b999c22b42a28ae8d625478ca304001f9a49782ec970031e673c76e4e27357a321729d6df38d1d88dcbf764c69eda3baac9739bed637010f44638cfe1deecc56b76f6e02d1d0c3f104462b9ffa5f20de4cf092d86a5bb35d5f62b0fb1c983a2c06df17c9ffc809c83e4b4335f5903fab536fbd9719847bb063541ecbe05c12ef8d058b3547faca054e3d662250f1cc1f925dd71297abc25fe37ab33a086759fac76208a64552f84d2e4d84daccdc3aa2bbd2c2f922bf262596742dfe034529d1ead2975dd3d197ab0e2e1c75c8b8f160ca6077638022d4afbd107979949cf342cb399347f3990029f0db6d9ac0c569d61d42539371f9a7ff59e9c83ff97d15bf0eeb254ae58fb7b1f9d8710c546ac8a227930c66ac841bc4f475229e5cadd14ba5a01e6b2da99c55861a08e2100e62c4499d30003fe30ddaa347d7a27c2158d3787d58fe51ae57d797bbef7f900508d1580df3e5233f0887567fba1faa918c246d2ec5c3b7aa022cb8a652d00b4d719e312482f57655eee80a90cdc73151fd7ab9c5367793d60c6088fab98f0547d7f547e10db202a25e027a5cd0abc41bb0e3ef563c0a6d469a702b2a26f0e8b4fddb845a16a5f06b9dee33c3adb31430c94942c5023179d3e4441948a332069a1c3b69dca65f05a43452e42fd28a2f7e6344f98ab9a7e4eece3c1709be1f7bb620f8b6c45989a8bccad39a4bf40e8215183d1449196f1f9fc17de778b616856152e6e6145a1b7a3d7f226becaea5ebe34aa4bd06e60f0fed207bfd21f5663bfadd37dd722437bcd46a26fb4e19d062574a81bcd817eecbc1914a5878809128961acdd73113ae9c51070ff4494e16d81ccec777eeb513da82bf43d4884812b26546b4370dc315793271b069f60f4285f648cf122ed8b22b0c7a27e94ccd59a273eb774c109e19980e146850de95f82cdd8aa0e82022672024c917b281422d284df0ee0bdeb3d4ac56b4ca675ebdb835c17b6a822d79ae7310f4aa41d80ac61c5e45c1c0e1d64542622a31091a9f87c335e86d964dd85a951d7c9bf41c9f2b1a9bb8424d7d1b26413da8034182fa42d2b1cd1f8745482c49d8348d19c72cf5a02bd28e4cba82128af8bf5d9c1215c4f543ef4d185f100f8d803dfa29c300c072e44ad9542b82fb1380d55c15c9a4b4398876e2450b90b49990746f339abca8cc8a462b62329a128758ce0e46b5f998af1bb485a3044bd125424eb5c623afd2a11befe4ec544eafe275ed1ad82b940dad5e9a9710d48562e51b296ba81f2d70593685ba0e3f3b25089a187e61d5675dd481aa99620276cb0a841a3c4df201a929287b1127270c5d25d06fb286dae1a9a5a5cdb60003f0c30d2021074bf252e550685f7b51a087a77b0871e883104e55f898aa5bc4cf8538c293253a737556d7f220e15b90cf0eda7d5f2172372e3c50c12cc588f312da37191b5038e944825044b130bff281ecd47a4252a1411ab7a9305c2b37e9facd435e9c434de37641498f8e4bfa7b42966da29c84200aca87ea1c3b00db54906b340e524a7dc4a15403bb82bc24517cb91026096bdf18f5f7ae5640ed6de1f0c5d184813d6b9d244b32b58e9ff524741a39383eec3a530d60db13deb26e3523a725f0599b671b625c07002704fb600b77318417d2527537359d122e22a1f7581eaebdc19e65ba50bdda18ae08e9a8694fcb0ff1a2cd98d910dbcd52064c15a4282d67b278c72a0fdbf228abf6b519dd28ac21c57d1da4bb7ad5b5ab10da6b83132df1da79ccfc77fb45598bbd91ef5ab96d8a2ee148639a562debafffd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee00000000000000000000000002faf08011b29e60a38883a8d4434f17ca3d92161109f7ddd8799e64e86d6b8509babd1100061b100003b8c1771721551fa88af8fdde92909add6e5b8fa90a4b0484ee065ed3ed7c56e733a7fcd775d4ab92956c1328ffee9c195004c5dee5dd5b9d0f9034589e6769e72579d3d5837ad70785ec420b4a24c04d36668728c0d2534ff1feea9aac2410423fd79c7db9231ee7efd3d585646e378fe53d731d18f38d6356a970f5c3026edc849d49ff34e58dfb7548512461110088ac3aa800e10785029ba3b0e9ab7bde0f056939e4921792dba2f5c005135daf57e32cae06a9ccb1b4d321f3ba015e5b92def1ff1c200e56b3990d82570586bfae26e9398e17dc6c069f92d80e6dfedf6b2f24b1dc3cc9d63e684d861f40fdbf508d4ac34b7f10c57be2a9b0c5921f86869c29ada5394b8780d2488a4fca3cd98ddb0ff8ea4415a07caea436682835744e94d5cff6d3024a9525dbd697e499b7ef23062b18b225bfaa4c5bb07166f34ff7866ec8f0fbbc12f695c609692798364fa20bf7977e321deda3fe5510833494532fba94fc1f0dd14ec74f3e9fe8ee659634621b63d16d46a8958132c24bd82c516bdf9ae9515cebae42778e4de6be7047c31cf86c0df0306f7b6562e1f35be51e5e64cc6d9d4c010849e6ac7ddacaa4b7b6fb1d35aac815964090940e73a1193eece11c1c1d37e373ef58c5e2d690b6ed6338360af9906146da9db8329bd2786bbf92df10445ee093f0b1b2a640cc2daf003fa7141435ba1dd54f9cdbf5417fa7f539b255452852a85d2ce97ce5abed4980e7b409e283f97ccc9c01e104b55155f96ace6789f61c4661962d34fc5d7e6f5f5233180933b2fa7f7a5b074714645489f5221966160946b7bfbf0fe6733e6beb8af4457b9d36cde1200811009ec483a9d730ca980aa28f636942af5e89794a8edbc1b75d555ba134974374d0fe23d31c26566064eb9998d649bb2bf066bf710da50672f4e3ab4df843a0c8942bad0a071c237d4c1759eca37380919e36aec73284db202a32d3d1619f3e5b757b2df8b04bde567783dc8e465d996799782f1a1b8de9331681a35aa04edb427de87264c8ae9c397f29d3e8730db91256425a10b960a9de1a48d0d4186d617d2b69c87e2540f6570faff4ee1f6303d7d281434947abeaad83c86a4d25bef4de2bb3c6104aa0ceed7c8df039f4be6a42851a118adb1b8f98e02f6727b75d98541bab2ff24fb2f20342e86150c678941825409b62a844f44ca1ccdf0d9f7c2cf9b222fbed00bc92be0802fbfbbeefa71c8976cba8fc4aeb031480f434027b1cd593d08cbc14c2a360b736b06b5afb8da35f0be3818fff4275b8c830f5248a8b8edea1327454e1360bd90d4fa08e965f459b0b027e1180290cf762f813a31e8109f472d9657b03af737d1f7bd2e59441541a84ba818f1413c5cd1f8b9882e9188e0def9e44e2f4a7c710c893c7188ba86423f8ae86068d84e1832af548289e87c34d68b186df7e24ca5b051f8f5e4a44e2e7383ba2a09615b4147b34e86486731290ea67f3be24c13a9c5cc37f06555989b3f10c580a9cd2b416d0ee4210855c6833a25996761dfabb036f3893cff7db7e310baa8faa79f46e0ee43bf4dfd732eae7f44bad2e7c032b9c6d14947af6b0e37e5ec98372a622f716ffba0cde04b9d4508392dd154ddc34829412bfa604d4f00e4b10a553587343ef5c0944165e7ee1e34387b09c147ecba943cf36dbc4269efe50ec3a5a3075c43be9651d6db6acb9f657476952b78c990557f05935247a71077373ec436ec586def177448f8859ba096b7a838e5b4ce7a463f9082f705c26d99936eb1be584ea9b58a44b9b4faa07fd8247fa66cf4529d1b8cdb92ed7bd96bf0968db4376489c7d46f0f27d58ac884c29736502953723ef1ab41e19c7041d3e0e9091d7de2e3904d032de02292edb1225a672ab438d3c65f7921c06a9f181f8ffda4ac524d0e000fd05aa5d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000000000000000000000000493e0f81fd474bea478df0202b311c69e85dc6215f629491dd15ad0929faae2535abb00061b10000370b2714d2734e6b8cde085794dd7b41c8a9b6c03c1edd8e3db168ee7fce39493596e882b18b5b1b79c16400c6762b9856075821be6be9fab8f469f56820d8f341554400a8da7f1f1a8501902581d43b9fa6e5c68015716f718a2190b87fce41bf1b509aa61806394a42489d63c457fe4c79e7480eced1315edd731887e57704fc9102f50cb7f0d242d755cfd5a2172dbaf7f01b124861cc6d1dc804796bbb84165c805f0c0f3fb9ec97b74c2a694de56a9cf8d79d1a679260ee1169d78214b34c8a654ba22e59ddcd32beff4713de33549f035b342660405b0159a7a508e5691ef4805689140e72b8a0ef2e61be74dea5d0b8f5589e0e373cac2e2e1cc39b2121c05cf4122ad0f8b9af6fbf1de2ea26376c2650ccd306c13a7b64acbf2a3feed128754abe44658009e642768ae3d84f5e0fa5f7f360c2a1c76d26985817ae77b71fb59014a5483ebba9271cafa5e5d8031c569adeceb8bae6444e98d2522b28f6682109fc7d31cdb83ebd45e5d81e7f046df42345b49f470dbef9ed87709301d2c6131215d33a30b8d18e63e54a2aff85dd57672f8198bca6a67ee147c7d0ae649e5661ab6bf78a662fef9a164f1e332b9f16e6fb3d5769ddcbc1d1c07338d3394b9245d17618c2474e86c064fca4df00ad3a93dc051fd8c3328cde2a987798b0f22a21c90426700abeb1e6f38dffb485b5477ec44c690fa80e317b32a982fd3082253bba8595783290dbffee4fc9296ffdf16a8bf3154971bb720e78674969e9db2e0fbab9e9e13f24bc8b3af5e2f00f262f0da56de443f70398ab68f747d35370fcd8e1c0e130f7269e08f862b5a67f2c129be254df2358762ce3a947eb27d66450af51540e7721b47c8a5a86098ea64dad381f14e07aabbbc470949a99c07612add3ab4c575fe2e520bbe511a1a674aea37a44535c13ee3380f8f39bd230fc1481cd31912af36c6751e23c6f383cd37a8b13fa7df9f0c7e460739f2c6226638ee14f14d36366211cbc6a1e16b4856bf302a540aa9d9e833b1d59c510473096384c8b450f2f3f1dab9e614af822949d5cc93d76bc4d1a52891bc85f1981ef83161195ab7d8181ee4fb163bc6c685a10e87c7f4b15ed7d05833c230a4a5b63841fc65b959f0ff010e697f47c583f9b7fa9b389c0eff6614e47d85b83c483136f182be4c151d272f5d938b912a95e47d333e5de6a409ad271679a778a7eb3f169c71525302fac5d4575e2645c09763c2ef165736a7a726ca605038e2781404328790ffaacef2b9c2bf90122042cd571287bc4e3973da65fbd4e3da9e40e4347ca6eb4ef1ffef4e5a34be80425cae3e81533f7f2953f95fca53a22057a39125f5c76350fba7fc6c036838fb951d0aa8702e7f44c6f8a9cbce3b64fa8ddc2bb8c8b35d1e29a21beda6fdd332b31a749321455277231fd9d70ea4aded95053b395f88fa6916d126e1626fc0f1be6cd2a9538d17c498b40927f12b3bb40fa3e272e82cd2242b670afefa387470f4e6e0a1236028954c9e90311f486617187956a23b90b356d71e219e6dd055c2120771003a6c12769aa3ceacb9642bc01022731ca7a413b68ee7d1d5444f75dfa51a68b74a01ac85f6ceaf5e56987b9d67d6de896f5aafd25c78c413a6d4b5b03d571167524cd231ba13bd9f80fd7413faf21e8170cef0d08b242c5c38a2b0158da56e358ba0692f670d4611c7a3624b234adc30c5b7198e0afc941f5d13eae3a94ddffa652c784c34c582e04e948da91a5ac3038a9df38fd4f1733779f4f122ca2d7ff9d03bac9def35d9ee3a183161f8f2808d472b2e64581209359cea58ca7757164c666029982223877e2b14d2d537afb012f1ffc12cd083c16dfc64213c56f3d4d22b603d3dfab1d21e239d6fc1f9f153ed61f1ac91c29c85c16f4aa2985f84052f5a08d32bdd000027100000000008af34a0000000002c2322200183cab01341b3b937dc48c2d5d70e119b4fd5b4dc6d85e0bb49e98f1fe4ed87027bb80c7d8cec36237511da378ad5c121861660506bdf411240139e49a93e13aee25d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee270248e28af5950cd59a64545f84957e4cd869de45b4fb50b85313894a1567c134666207e5bec5803b71d6fd6a9cfea3e6ea9a8dfe645a7f4dc7c9cd6c4ce15a0002547bca65416a28af342589b5b771ce54464b17b2153b49a1d34a2ed0b0788ec37083e54750e6f368b4a40d18a8730522e8f23901ac856b697dbd91992d75e097e3f175514453a79521d93ca8b3ffed47cbe300afdd75d1dd23cbe0c14cf67b3856fbe2128b9b7543625f1da313516f7e441255f85e341371fb7f33c6833abf02000000000000000100245d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee000000002b40420f0000000000220020c57347ca54a9e6f279f6a1f1e50f19b48289c3baccdd356fb03033ae7ccb6e444752210252a01d9d8b03db1a99b1a82223f7dd60ecffa69dbef47c06228fdea2fe0f0215210322a747c1d7f77fc7577a689618bbeadf28b941412404ac5e216d684a32d57a8e52ae000100400000ffffffffffff0020cd6d4a4bf51a8c36a25cde5bc08188c5ae037fd9ad9e92b400bb3d10e473b55480007fffffffffff805d10939a524d7b2ab225cdb41decfc129208c372d51ca1db705bb1b9831e53ee061a8000002a00000000883a86353a00c855b5caa13998033c04330f88b88e084b3c00f228299e5554f0b66e9d5c630e194cd572acaee6e5124b612583b9722ccf24581716292785c4925c06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f061a8000002a000060535ae20101009000000000000003e8000854d00000000a000000003b9aca000000"
    val dataShutdown = hex"050007012ef2c0b2095e3e9131dc501a0c98e5bdd2cf2ac43561fea5a268475e5f37db0001010002aaaa00ce2f18a967dc4f25f414e671ba6585f8ef0b8c5fb812c21064f55a2eaa0009b24bcf77abf6881a270dfb46ae2bc02b3e37d09a687bf42a4665090edc3491d880000001ff0000000000002710c000000000186b0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000180802aa698202bbbb671d15145722fb8c28d732cddb249bcc6652ed2b297ff1f77a18371b1e63ff0000000000004e2003f0285c07046e02a67017e9094e04c5958c4894c59de7fb525e8848b06c33b71f02b12174865e2776d03ea17440cc0793b6e18401b87f9d675d3fc06a4a1c57a6b202ecd1e11cd7fc82a559567b19448e8023e5ae6c8960fdd7cecbb1ea5bc7d39fc503995345f0570ae8563976e70810bece1297a3c46db73675416d646482af784bbd000000140800000000000000000000000000100802aa6982000000000000000000000000000000000000000000020000000000000000000102fd05b12ef2c0b2095e3e9131dc501a0c98e5bdd2cf2ac43561fea5a268475e5f37db0000000000000000000000000011e1a300c829f6cc2a9b97272924872878a38c89436ac184bd890cdb3c03cb1b1030bb1900061b100003b7a341904a7325229f40e7e730700cad5dec73fdbf9ac439f5fccab34f0cf92e358a4203d0671599024681ca68360773643762f685dfdf5acbd1d386ef767219f51353e472bb9e6de2f0cf9ae73d323c13b489cdcf3d3dfacf43990bed4a6dc9e4260ab126270d556ff9dc93d347311a92632e8e3cc36139a13a2698ca802b4f1dc9cbda8bcfd76ed51ab556540b1afb86f75b963837d3e021ed2f4d83caee2bf160b89df97a0494f7c5b4b90ff5d0d69ea2bb152876a187e6a790ad0a4a03510b2dd8ba0a17aa8200661c9001c4f7fd3d1b959f367184ea37634725b343d6f474ea0f326abde8f1bab94da9fca54e2af3769197a9866862507ec79bc1dc0ec7a368a02fe2d1cf514692267854cc5d17aa8ad07a9ecd2d0a9e9f6d50646f1940ad444332105a170e1324b077010b3bf38a8ca7ae461cbf766e7af6c6f53a884eed01cc6fcad3c36962049eaa29f6c7a7324b084aabe64e32b812ffccbf7fdf3d9d6c4b6db1ee68e22efb94b6b29b1987b3a13e294c05cc437469d5898e45e8281fe3797212bf7e4c432abec13f9d20d801dd4d6aa02b24fcac38bf2448f4b4f3ff53a050b9562bfdb9a8d4d674328187bb94ffa383c4c36dab29f59ef26d1f4f1d7769bfddc0a54aef286b6432c7a91956571b440307b3db986e1b8c8f57acfc227a149122c63b4cfb15a1cabc88e089261e77808ba6e57f04789c5b76ecfd3bf48bf8175c08fe504c0ead6d85b077629127a31293e5caed20ba3db44750f5ba459efa2c71af0fa536b21de0ef5aae1bbc869687193c9796b4a86dc47d06c04411e71a10bac27f53889f0b287673fc85f5b1f7a842a8e7d82e77926a1b979dc12143a9729f5c9cddda49e56cc9767328e212326f4218485f633e27531e26dcbeb49459935de3a95d5f90cc8342d0774ae0003a43f2263b326a38d2bda2a467a4c58c2059078e501f766460732ead1296668ab8504f94f856150ec620241d270f3a1f73ceb2d565f88a6b1b1bc7c0439258a1d80dc39fd27333134d4590330af99679c8dc2f19a662b6daa035cff8da4aa318847551ef6b3b33149b150ac35d7fd151f44c970bd99b1bdef4c4266f5b1ea4dcf486757306ca256afb23808959619771261f1e934b69bff9a13ee2796ca7628a4b864cb765401b3b6d3355516208cff9f401cd1f9974055d5278e07411e1c4a0feebbef7e87be9f2c28cbd2d9e4d019c0cf34bdfb0cb71bb19255ee3b57153b747a5953d5a83613b843b550f9e8e4f6f9689c80c41e1ba5313373b4893897cbf37d1435061e9e6855c2aaa579e19b4088083ef78119a03a74e0857a0c8279d6ea86ec1ebb7fdb41a1afa436c9fb91226322902965fc6a79c54b21c1493f0bb9f692511dd90d101449f637b3e605dd425d08167dfa8aecd35d6945e74857e30d64fdcc3767586d2792faef4b1b15dfd6f683c490ad640fd32b955edf862b6f1d1c09fb531b142b08b72f355f3d2971e9667c3322d21e791225453c797c66e4b0710461a314bb20e098b6b64076bb508ebb70c12116f1db5168c946090a83735a4367ab7d0917a1647122c1ac47c8f18368a7ede37ade9531cd69df43504a327281bae1826cef8e960e2d3651d32d21f594b66ac022a1dcdd28027da271256bb1e43a630f1f0315b4728b449c4468035c063b9923fecc2bff863f080ffe3d9c49dd73a2b10498509beed2f38d6cbaeaf7974627e6a28d383d79acd380b0d9ed6fd12d6709294586067ee68fd67a071665d3c9e5be13478c67cad78683ded8d3ec8fe7db736e8c50bc4a3762839782886f007db05afa46aa6c480a81f8c54d6444d053849af8199e3a502bf77649d72e03662d29bac6b448ea4a91deb627d8936df7dd06f204063b67ac03d04fb6dcc8add741fe16675e2ce187f267e911c6b2f42f3f8fe0001a14701070001000000000000000000000000242ef2c0b2095e3e9131dc501a0c98e5bdd2cf2ac43561fea5a268475e5f37db000000000000000000000f424002ed9f70ce496242e1c79388e2a176adc7f98f8a1e0377a5f38c7cea688e414c8e0400012401010101010101010101010101010101010101010101010101010101010101012a0000002b40420f00000000002200203f1e1ebc1c015ee48121698baa1c9ff86a5dae6754c1778d8c940e4858e07fb3061a8000002a000000000202000000000000044c0000000000000000000000001dcd6500006402d000000000000000020001020000000000000000000009c40000000011e1a3000000000017d7840067d9164bf0ed90c5e76ed1786334530f9a89b57dd8645d61a9d88bf328e9ac8b0151db1af176a59269ea456d589fed9ea79c0cabddad5902f877dbf4f82c30562a60748f3b2f5fd86db13a8c3f61d92c6960ebecb610211209978c5496676729850001392ca4a5200406a05b9e90815d84fab4082e273620be56a2af5447b8687df1d976aae1ad300d88c5017ccc9ec7fa135a4396762f94879641471568d8eda054a700000000000003e800000000000003e8000000003b9aca00001e009000000000000000020001010000000000000000000009c40000000017d784000000000011e1a3009737dfe5d0c76ba8da73730db86b30b7c749cec84c20c8c82b1f983a6875bfdc02d6c263c2da69cd9c05468823f3016634104e05cb02380fbc959a3d44e52a7a55000000ff02828d2753c7955e13a3b1109c215e8920e34ac565bf4aa61c974e1c480ed450560001003f0000fffffffffffe0041a4772678ca4b2a3539b2c521e3ac1dbe572cee66236d20d420b7dd17e96c11b10000fffffffffffe0001000000000000000000013f0e212ced22456cbbfbd4c61e30a81800382ef2c0b2095e3e9131dc501a0c98e5bdd2cf2ac43561fea5a268475e5f37db0000160014761879f7b274ce995f87150a02e75cc0c037e8e3382ef2c0b2095e3e9131dc501a0c98e5bdd2cf2ac43561fea5a268475e5f37db0000160014761879f7b274ce995f87150a02e75cc0c037e8e30100"
    val dataNegotiating = hex"05000801dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e01010002bbbb671d15145722fb8c28d732cddb249bcc6652ed2b297ff1f77a18371b1e630009681017da40f48f9b5fcd904ea23a0e16291341ab605e77bbbf3905af11eb17d180000000ff0000000000004e20000000000000140800000000000000000000000000100802aa698202aaaa00ce2f18a967dc4f25f414e671ba6585f8ef0b8c5fb812c21064f55a2eaaff0000000000002710021ad1d4b30a4f9139aff5627f426b8ff04f4d1cf4cfd58781e7174dbf8a76acb003e3711dd21be2f65fad17ec131d75d8eeda649d496d0ebc2f91b26520dcf26982027dd7a5313e51856a13efb6383bd67faa923fe20ad96223c18ea555a8f5d3ba3002f4aaf2516efe365c0a3cf14f898ca593a278ad855745d640751180104fd73feb0000186b0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000180802aa69820000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000024dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000000000000f424003f3841b40e4a5046ed410f8eb1fb79c59bc6ddc968f73eb92f87286c9b9d204470400012401010101010101010101010101010101010101010101010101010101010101012a0000002b40420f0000000000220020c4e7d23983470367c25e869bd7b18432ef51e87e017363d7bc59d22b0280c2cf061a8000002a00000000020200000000000003e800000000000003e8000000003b9aca00001e009000000000000000000000000009c4000000000bebc200000000002faf0800f2789e59bd755935d9b2edb1c8922f6643be2ce8d8639cbb6729d0b2f4716527017b988f15ee147358fc4f9292e356f630610bd0f357870ed25bb3cb1259db834154aa6539cb6e8b2835d9cc0a7553b9e8015c1977c187a5142e958660d20c13420000000000000000044c0000000000000000000000001dcd6500006402d000000000000000000000000009c4000000002faf0800000000000bebc200095b196f66547fd545611cae4c4820b8e6d4508b1d920b0abb0ff7471c3a7a42021f8171d635e4f51bd1928f8858fddbc3b478af680a9face1412ee2fd36452346000000ff028f1bb0bb97608dca87a17a922b1db19029efd8d91ae756ba2107abe3230953eb00000000000038dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e00160014761879f7b274ce995f87150a02e75cc0c037e8e338dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e00160014761879f7b274ce995f87150a02e75cc0c037e8e300010003fd014324dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e000000002b40420f0000000000220020c4e7d23983470367c25e869bd7b18432ef51e87e017363d7bc59d22b0280c2cf710200000001dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000ffffffff02400d030000000000160014761879f7b274ce995f87150a02e75cc0c037e8e3dc260c0000000000160014761879f7b274ce995f87150a02e75cc0c037e8e300000000ff000000007adca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000000e2463e56c7056bd78cb27a28bb76e22fa67a1737012b2175c0dc5992ffe75247c9e167490658a73c4f2be18e99dbf83c6194c691f009eb9ab753f73596e246dc5c301100000000000001a5400000000000034a8fd014324dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e000000002b40420f0000000000220020c4e7d23983470367c25e869bd7b18432ef51e87e017363d7bc59d22b0280c2cf710200000001dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000ffffffff02400d030000000000160014761879f7b274ce995f87150a02e75cc0c037e8e3782c0c0000000000160014761879f7b274ce995f87150a02e75cc0c037e8e300000000ff000000007adca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e00000000000008885cee0b9b066cc86016de90d618da7b7f16349d7994b7232b80fc1cd3bc326b5a007d61da1c6bf8071b6ae1a5a8c29ea1c9b9ee777c59b0dd8268d6b57cb237eb01100000000000001a5400000000000034a8fd014324dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e000000002b40420f0000000000220020c4e7d23983470367c25e869bd7b18432ef51e87e017363d7bc59d22b0280c2cf710200000001dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000ffffffff02400d030000000000160014761879f7b274ce995f87150a02e75cc0c037e8e3c82e0c0000000000160014761879f7b274ce995f87150a02e75cc0c037e8e300000000ff000000007adca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000000638e1c5909ac828b7fcad839afdcbb08085f529b96ce803db98cfe1242eda97f3b4778731d114e9490cf07e81cb687dc90d9a6ccd3433128af54d87b81586000ad201100000000000001a5400000000000034a8ff24dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e000000002b40420f0000000000220020c4e7d23983470367c25e869bd7b18432ef51e87e017363d7bc59d22b0280c2cffd014d02000000000101dca86c28f42d8793ae0e65a6ec747983e252fc9c93ea042f510dc9938bf6b43e0000000000ffffffff02400d030000000000160014761879f7b274ce995f87150a02e75cc0c037e8e318310c0000000000160014761879f7b274ce995f87150a02e75cc0c037e8e3040047304402204c28eab56bf1f1477d8d9ac7b02a4b1e582608c2dc1da72f3060b65f95d2510b02204e55ed9444d39a542cdb0e270d3758e935bd122a6fddff297bda2209c5aa38f901473044022046dfba01365cd0e8989980ff558fa0a1ef649262f7d37522ebd143792115fcd10220342d658ec27efa39627c3fb55abce8b850179843f00da872be4a47a359b33f8f014752210376510328f91bf430fc444048aa4f204b7d04b208826b07e76e99c6290879991e2103f3841b40e4a5046ed410f8eb1fb79c59bc6ddc968f73eb92f87286c9b9d2044752ae00000000ff00000000"
    val dataClosingLocal = hex"05000a012f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb501010002aaaa00ce2f18a967dc4f25f414e671ba6585f8ef0b8c5fb812c21064f55a2eaa0009fb06f68c2377f76291612ec4a90a34399180c41c3eeb5130d4593c2648aaebf380000001ff0000000000002710c000000000186b0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000180802aa698202bbbb671d15145722fb8c28d732cddb249bcc6652ed2b297ff1f77a18371b1e63ff0000000000004e200319b253943833df9299411fd93035b7c7907ca7af1c522ada034aa860c7aaf117034cda59ef0c36106fef2ef99769b553ba116916c64c8d7e17619e0cedf4d327d30353418e63b7891f578f6caa7fe041815c19ba3afcd70b01955fbafd0fe08f06dd02b244d38d0ced96d8282c4006d44e9f3eb34e80acb0d612cd3a7970d626a74186000000140800000000000000000000000000100802aa69820000000000014a00822f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb500000000000000006e582d0c2714b4495f83b884257b0560d2141bd6266867cb073306dd9e14f43e000000000000000000000000000000030000000000000001000101fd05b12f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb5000000000000000000000000068e7780f13140ed218f8882803ee844374172569e40df747c52cb1b36aad3b645f99b9000061b100002ce8864be51a66ca5c6eb0a230e56f4dcfcfa3b293df870745e2290896d1458b1c7963d6b246f5f4e025759adcf2066fe86cc2faf5667bee06ee6224074222234af87155870dc44b51c553acf2dfcb15bd914991732e1a7379f85fb120e17993fa335ef07c3032b96393d37fd993d8f9a6318d538c912a30768fee364457bde1f252e783dfb3a5a0f19f4753cefe3ed343b1e346bcdeb16efa3e0b54fd87265708dbca839a36b5e04ff9bf4118c7829c79aaac2d6507cb964751d65bada9389a64cf2c18758cc30aede626c4edef10da1b33a7372838087fa4a02ba3a1db8b24f7748528e71bde418b35876f16bac6c4230b6f03cb3b0349eda81ed1a427ce423fc47db0bffd67ae4065d9c93f494bb9c4932d5a4ddfa7c83c4bffe381873b2946293d0cd44500760a947f27ec91161a1ccf48c0b5f83e9123fecd9b1ca1294a7bf20b35b42c7fd1d66973679d819d4025104c845e972d826165de4df315197b0e53caf66276437c0b4c37ab4c8b93f2abd522a8f28f60bf01cfe3d0d0e97dc281ace63888dabaea00fbd7af4718d0f752210bf84b6a947f8314d6966115b7da9cfe219fa8e9fbdafd7129a7ffd183ba436173548e707db5233e6616bd94ae24fc841e6dfd2b9eba1202a4ed06fa09c0010d82dc2d225f117ec122d1c9458fc92333af73ac40206fb201366f113485d0cebb12163cfde5479793335b9d5e742a1e48d0645c9184d6a2509d9ee41bf2f1192ea19e0b36ea913ab8d00d4dfd532a42e240db95e709b8fd6df30eeaf7788abc8856ef4414d6262c534727116d622b88376cf405c69d44d5332fc9174a914f4c3324b5f3107f81a4389caf2d2bbded2fdfe5ddad8c82dafbf52aedfb14226a306521aeab9bdd4036fa8c8a8ea92c843c1b9542562ffb5afd5c49de0f70d77794f11737621eaab43803761592bb56b711248756816a92edea6e445aba84381bfb3c42de2893aacddeaec90f47159927538ebb12aab84b5060109b25316ba59f87a25058645a7e3a4175d5a915c46cc5962efce2504d40efdab3d7cec04019cb06b162136a093d8ee62e3142839f4c465c4236c331573d3f44bc7057498baff80a480ba1aef97bbd4ee5324ced9ffe9cec175c334b41246177efacd5c6d3ad4ffe8dc346509e562ee59049285b863f81c8f4e6f031c571e6244cbe4bb83ac9b183aaea3f8d1bc048dcff42b10ef2df17c3d8798f9e14ad7ef94f0c95fff06841d9aae4a196ba9a089fa4031d26f463377558670cf8c1e1169b34846e407d0e92722d2a94d0a9a600db4bc44eff4194e1133c312de59818b5eca63a0d838c67053d10e5c8245b7855f1773867bfb05ea9c7b3941f7900f9e31ee959b4de8b694ff00306b64bac1e7939356e4bb354bcb78b94bb85da84427347daea704df10c78ffa639c32f747f575cd8273d23b9141275e38d073988463590fd3e9af73499e7fce8e873f23dc579df19f205472534db58e97781b78783d9be95dde62aaeb70a07627a58137cc908e26ff1b9191f005c5a4e470db1fb8d288fe09a6938dff43cac3694f390be5a40839e3e535f73c82711b1005d7e30da9d04efd5af1839e37d75d29c799928cc3cac114b701b160d990382d3d036f943b15fb54f92f12373f96a97ff194f57d5ecf2ec544190613f059f88658e642e6cbc2d8e7fe9bb65a720714d79b07ea3477efba4babb11c5be1550577884af16304561ee156cea61b58780d88a1620bce4d25dd345aece78e8d46ec674cfbc2a7e670399a2fee1a20679994c98c3e59c97a1d7e983c0b53cb5e7020a0bcbc9032c059bab48b4a0d37bb95573f083c6feab01502d3ddffaed478b4349acecb69c6f9a9267d51a807d8d9ec2dfce6eb734028208b28a3f4942c402314f34a692d47a6341ac6de75da8b535ecf16fff5fe0001a14701070001000000000000000000000000242f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb50000000000000000000f4240038e5944509edcc47eabb32e68747f92c61bbea857b1e122649df2acb4112bec600400012401010101010101010101010101010101010101010101010101010101010101012a0000002b40420f0000000000220020c45bdb7d812241b0d1697b60708b02eab5c0f0f9ac4e5764bb9885995643e37a061a8000002a000000000202000000000000044c0000000000000000000000001dcd6500006402d000000000000000070001010000000000000000000009c4000000000bebc2000000000029209080b6d9cb30fefe3c2ed5f9dd0a8c3ed9ccf54d620b701c56410e4ed78fcefca9490174dae76c12d1f3faf5efb7f292840af187d0ea0d008cdb8f46e0efc6ecfdb8b542431cca69c265250c3a3658d3a8b02cedd971cfbb11cd28f65a9ffcc6d5a64400013837689fab474750fc8e9666bb5471d22d1d52ace1214e99e21edbbf6941e9ad7760e73a34b1c1d81a444af0fd52ea77ffb17a6d548684c93b70512a8b18ccc000000000000003e800000000000003e8000000003b9aca00001e009000000000000000070001020000000000000000000009c40000000029209080000000000bebc2002d88d75ca245aedaee7709732088573676471c227727a98b06400a2061846799022bdcbdf3c0ff1e21548b7d455e884599b19f0d57318bf14d56fde08084ec550cff622f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb5a44461f6b1d094ed5897fd8df1b4783e64bbea90fca7b57c462324918f9d980e24790d7ed23e5bde59de2c46f985473228d923ed2b82996afe4dec7f98890628000000000000000000080000000009c4000000002920908000000000127a3980bf359514f86a18ff97933d96c98066162b1242becb32a7052d3f03ba6f819b67035e30811486ba863d85ac010fa0933784b127b5131a62b2350627e01e93dd052c00000000000000000000070003003e0000fffffffffffc008099021981b18487b451d600bb56646a67d4907a3488c272d433d89a3cf653926400fc0003ffffffffffe80101e785c8322c3b362fc88469cca7a3b9106603b25da1a49e200bd6f55680402c5802000007ffffffffffc80105973e8039fc5967d85026e102f6e5eb92a0f9cc2de954df456b3f280cbab1d1040003ffffffffffe400000000061a80160014761879f7b274ce995f87150a02e75cc0c037e8e300000000fffd01e7020000000001012f2eb1b005627f7bfa0a75f9a58264e76b3e5556a0c0390c3391d7bbcb01dbb50000000000a33aee80054a01000000000000220020387286e7d751204df392696a71984ea6477974810a5e4b2995f4643e429c624b4a01000000000000220020fd9d83d03e8d5299369d43466aa0d0f63942791c2fb9081d06f6170dc58b8dd7b0ad010000000000220020c678813094320ce2737c4a64d5a969022f41c530b4f10aa8e67c5d03e1efdd4804fe0200000000002200202f6616b0cd17eb00350ba0ec9c533de947891504d1540dfc6b76760c2d35252b50870a0000000000220020aa5617da3371dfa43aa83633223bb74554051a5419158bde45ff7df812ddbf690400483045022100c3df79bff08d2d1d253621523eb1d0d8318ec5113ad313ed38a117fae15f6f830220292be1fc199f6ab0c36deb3dab91f45f4d70b7933458187cc005a2db36911c3b01473044022074dae76c12d1f3faf5efb7f292840af187d0ea0d008cdb8f46e0efc6ecfdb8b5022042431cca69c265250c3a3658d3a8b02cedd971cfbb11cd28f65a9ffcc6d5a6440147522102efc3254975667057c8d8ee43cff68662eea27bb06b21cfd6aaf7fe14e33277be21038e5944509edcc47eabb32e68747f92c61bbea857b1e122649df2acb4112bec6052ae9e52f120ff2449a9fcce8fd74e0e41561c700b624df5ccd93e8c0addf9d52e3cfefe30cbd9b603000000ff2449a9fcce8fd74e0e41561c700b624df5ccd93e8c0addf9d52e3cfefe30cbd9b60000000000012449a9fcce8fd74e0e41561c700b624df5ccd93e8c0addf9d52e3cfefe30cbd9b6020000000000000000000000000000000000000000000000"

    assert(JsonSerializers.serialization.write(ChannelCodecs.channelDataCodec.decode(dataNormal.bits).require.value)(JsonSerializers.formats).contains(""""type":"DATA_NORMAL""""))
    assert(JsonSerializers.serialization.write(ChannelCodecs.channelDataCodec.decode(dataShutdown.bits).require.value)(JsonSerializers.formats).contains(""""type":"DATA_SHUTDOWN""""))
    assert(JsonSerializers.serialization.write(ChannelCodecs.channelDataCodec.decode(dataNegotiating.bits).require.value)(JsonSerializers.formats).contains(""""type":"DATA_NEGOTIATING""""))
    assert(JsonSerializers.serialization.write(ChannelCodecs.channelDataCodec.decode(dataClosingLocal.bits).require.value)(JsonSerializers.formats).contains(""""type":"DATA_CLOSING""""))
  }

  test("serialize timestamps") {
    val ts = TimestampSecond(1633357961)
    JsonSerializers.serialization.write(ts)(JsonSerializers.formats) shouldBe """{"iso":"2021-10-04T14:32:41Z","unix":1633357961}"""
    val tsms = TimestampMilli(1633357961456L)
    JsonSerializers.serialization.write(tsms)(JsonSerializers.formats) shouldBe """{"iso":"2021-10-04T14:32:41.456Z","unix":1633357961}"""
  }

  test("serialize channel command responses") {
    val id1 = ByteVector32(hex"e2fc57221cfb1942224082174022f3f70a32005aa209956f9c94c6903f7669ff")
    val id2 = ByteVector32(hex"8e3ec6e16436b7dc61b86340192603d05f16d4f8e06c8aaa02fbe2ad63209af3")
    val id3 = ByteVector32(hex"74ca7a86e52d597aa2248cd2ff3b24428ede71345262be7fb31afddfe18dc0d8")
    val res1 = RES_SUCCESS(CMD_UPDATE_RELAY_FEE(ActorRef.noSender, 420L msat, 986), id1)
    val res2 = RES_FAILURE(CMD_UPDATE_RELAY_FEE(ActorRef.noSender, 420L msat, 986), CommandUnavailableInThisState(id2, "CMD_UPDATE_RELAY_FEE", channel.CLOSING))
    val res3 = ApiTypes.ChannelNotFound(Left(id3))
    val map = Map(
      Left(id1) -> Right(res1),
      Left(id2) -> Right(res2),
      Left(id3) -> Left(res3)
    )
    JsonSerializers.serialization.write(map)(JsonSerializers.formats) shouldBe s"""{"e2fc57221cfb1942224082174022f3f70a32005aa209956f9c94c6903f7669ff":"ok","8e3ec6e16436b7dc61b86340192603d05f16d4f8e06c8aaa02fbe2ad63209af3":"cannot execute command=CMD_UPDATE_RELAY_FEE in state=CLOSING","74ca7a86e52d597aa2248cd2ff3b24428ede71345262be7fb31afddfe18dc0d8":"channel 74ca7a86e52d597aa2248cd2ff3b24428ede71345262be7fb31afddfe18dc0d8 not found"}"""
  }

  test("serialize short id aliases") {
    val testCases = Map(
      ShortIdAliases(localAlias = Alias(0x4455), remoteAlias_opt = Some(Alias(0x88888888L))) -> """{"localAlias":"0x4455","remoteAlias":"0x88888888"}""",
      ShortIdAliases(localAlias = Alias(0x4455), remoteAlias_opt = None) -> """{"localAlias":"0x4455"}""",
    )
    for ((obj, json) <- testCases) {
      JsonSerializers.serialization.write(obj)(JsonSerializers.formats) shouldBe json
    }
  }

  test("serialize block height") {
    JsonSerializers.serialization.write(BlockHeight(123456))(JsonSerializers.formats) shouldBe "123456"
  }

  /** utility method that strips line breaks in the expected json */
  def assertJsonEquals(actual: String, expected: String): Unit = {
    val cleanedExpected = expected
      .replace("\n", "")
      .replace("\r", "")
      .replace(" ", "")
    assert(actual == cleanedExpected)
  }

}
